Friday, February 2, 2018

Password Validation in php

<?php
if (!preg_match('~^[a-z0-9]*[0-9][a-z0-9]*$~i',$password)) {
         // $subject is alphanumeric and contains at least 1 number
         $passworderror="Please enter password with digits";
 }
?>
Share:

0 comments:

Post a Comment

Popular Posts

Blog Archive