Yes, I'm sure. I've tried the same thing in a different form and it didn't work either. This is my form declaration:
ad_form -name area -cancel_url "one?organization_id=$organization_id" -export {
organization_id
organization_type_selected
country_iso
} -form {
{organization_type:text(select) {label "<span>#</span>organizations.Org_type#"} {options $organization_types} {value $organization_type_selected} {help_text "[_ organizations.Area_change_help]"} }
{main_state:text(text) {label "<span>#</span>organizations.Main_state#"} {mode display} {help_text "[_ organizations.Main_state_help]"}}
{states:text($widget),multiple,optional {label "<span>#</span>organizations.States#"} {options $state_options} {values $states_selected}}
This is the error call:
} -on_submit {
if {[lsearch {2 4 5} $organization_type] ne -1 && $states eq ""} {
template::form::set_error "area" "states" "Required"
}