HI,
How to validation avoid text in single quotes in model,
For example:
I have City field name in that field Suppose user can store 'hhhhh like that i got an error when adding text with single quotes…
HI,
How to validation avoid text in single quotes in model,
For example:
I have City field name in that field Suppose user can store 'hhhhh like that i got an error when adding text with single quotes…
Add in your model rules array -
array('City', 'match', 'pattern'=>'/^[a-zA-Z]+$/', 'message' => 'Invalid city name.')
ThanK u Buddies…