I am using 2 List(Text) fields in my form (that are required) and this fields aren't highlighted neither filled with the "@title fields is required" message when not validated. It seems this is due to $element arrays nesting for this specific field type.
Tried some debug and form altering but didn't find any working fix/patch so far ...
Review and possibile patch required, if bug confirmed.
Comments
Comment #2
itamair commentedComment #3
nikunjkotechaIt seems this is related to how Drupal works. For list fields default / empty value it uses "_none" as value which actually is valid value as per HTML5 / jQuery validation library.
Will keep checking further to find a proper fix for this.
Comment #4
jelle_sComment #5
nikunjkotechaThanks @Jelle_S for pointing into right direction. Closing this one as it needs to be fixed in core.
Comment #6
khaldoon_masud commentedI applied a hack using the form_alter hook: