Please is there a way of implementing HTML5 number type 'min' and 'max' in symfony2?
I have try this:
->add('min_age', 'integer', array ('min' => '18', 'max' => '90' ))
and getting error "The options "max", "min" do not exist".
As these are attributes of the field element, do the following:
->add('min_age', 'integer', array('attr' => array(
'min' => '18',
'max' => '90',
)));
It will render the form element with min
and max
attributes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With