I have this code
echo '<input type="text" maxlength="32" name="first_name" pattern="[A-Za-z]" value="'.$_SESSION['user_first_name'].'" required>';
Even if I put something correct it says 'PLease match the requested format'
The data is 'testme' which is correct but it's not passing the validation.
You need to specify how long the pattern should be. pattern="[A-Za-z]{1,32}"
echo '<input type="text" maxlength="32" name="first_name" pattern="[A-Za-z]{1,32}" value="'.$_SESSION['user_first_name'].'" required>';
pattern="[A-Za-z ]{1,32}"
<- Use space in the first name pattern.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With