Simple validator for french phone numbers
1 follower

Seeing ineersa ukphonevalidator, I remember I add a validator for french phone numbers, so I made it working with Yii


Yii 1.1


Extract FRPhoneValidator.php to your extension directory.

You can now use it as validation rule:

public function rules()
   return array(
      array('phone', 'application.extensions.FRPhoneValidator')

I kept the allowEmpty possibility.

Be the first person to leave a comment

Please to leave your comment.

Create extension