I have name and mobile number fields in a table. So how I do validate name be alphabets and limit to 15.
- http://api.cakephp.org/3.0/class-Cake.Validation.Validation.html#_range or #_maxLength (same link)
Need help with coding: Scroll down a bit on this http:// book.cakephp.org/3.0/en/tutorials-and-examples/blog/part-two.html#data-validation
As far as I believe there is no ‘alphabet only’ validation rule, but you can always create a custom validation rule.
Alternatively, if this is a one-time thing then you can use php’s preg_match with