I am using the clientside validation module for validating a form in my website that has a interval field. All the form fields are validated properly, but the interval field is shown as field_duration[und][0][value] is required. Attached is the screenshot for the same. I would appreciate somebody to suggest me how to fix the issue or if it is already fixed, would like to have the patch...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Version: 7.x-1.37 » 7.x-1.x-dev
Category: bug » feature

AFAIK it isn't working, if you want to implement this you can write a new submodule.

You should define a new fapi_validation rule, using hook_fapi_validation_rules, normally it will get picked up by the clientside validation fapi sub module.

avinash1989’s picture

Can you refer me some resources on how to implement fapi_validation illustrating some of it's API functions?

attiks’s picture

Most of it can be found on http://drupal.org/project/fapi_validation

Or you could use fapi_validation_rule_regexp to do the validation, and use a hook_alter to add it to the form element (or patch interval to add it)