[html-formfu] Validation callback

Dermot paikkos at googlemail.com
Fri Jan 23 17:36:16 GMT 2009


2009/1/23 Ronald J Kimball <rkimball+formfu at pangeamedia.com>:
> Dermot wrote:
>
>> I am trying to validate an item in a Select field. The field is
>> populated with the first entry as a [0, 'Select a User'] option. I
>> want to ensure that the user has not forgotten to make a selection
>> from this Select field and that the Selection is valid. However I am
>> struggling to get a validation::callback in config to work.
>
> Have you considered having the first entry be ['', 'Select a User'] and
> simply using the Required constraint?
>
> Ronald

I hadn't. I assumed that to make the first option was "Select a User"
the value would need to be less than all the other values. Your
suggestion works thought so thanx although I am curious to know how to
implement a callback.

Thanx Ronald.
Dp.



More information about the HTML-FormFu mailing list