By default there is selected first term in vocabulary which is required, so if user will not change choose anything it will be still considered as correct value.

In http://drupal.org/node/41846#comment-82774 is mentioned:

I.e: You want to have a mandatory field for user registration that is "Country" that means you actually want to know where your users come from. If you provide a default value for that field, then you'll end up finding that half of your users happen to be from that default country, whatever it is.

It will be useful to force users to choose something to pass form validation and reduce chance that users will not see right term.

CommentFileSizeAuthor
#2 mandatory_select.patch1.59 KBanantagati

Comments

JirkaRybka’s picture

Status: Active » Closed (duplicate)

See http://drupal.org/node/180109 - my patch in there is just waiting for review/support to get into core.

This is duplicate.

anantagati’s picture

Status: Closed (duplicate) » Active
StatusFileSize
new1.59 KB

Attached patch is making this:

If vocabulary is required default value will be '<select>' which will not be pass validation.

If vocabulary is not-required and not multiple choices default value will be '<none>', which will pass validation.

JirkaRybka’s picture

Status: Active » Closed (duplicate)

Seems we posted over each other accidentally, but still I think this is duplicate. My patch in that other Issue is probably closer to get commited already.