priyamp mp1 priyamp mp1 - 11 months ago 50
PHP Question

Yii preg match Not allowed Numbers only

How to avoid numbers only in Name Validation in php? I want to do Name Allowed space,dot,special character,string but not allowed Numbers only How?

Am using below code,

array('first_name,last_name', 'match', 'pattern' => '/^[A-Za-z0-9_]+$/u', 'message' => '{attribute} contain Alphabets only',),

It not allowed Special character too?

    echo 'you are not allowed to use numbers';