I have a contact form in magento 2, and I want validate field of form requires enter at least 3 character and not allow empty?
i using this but only work with not allow empty function. How I can do it
Thanks
I have a contact form in magento 2, and I want validate field of form requires enter at least 3 character and not allow empty?
i using this but only work with not allow empty function. How I can do it
Thanks
You should use the validate-length
validator with minimum-length-<value>
parameter.
The core does not contain a *.phtml file example for minimum-length-<value>
, but does contain for maximum-length-<value>
, it is similar: