We have a login form that allows you to enter in your user_id
or your player_tag
. We have a model with the following rules:
protected $rules = ['player_tag' => 'required|unique|min:3|max:15|regex:/^[a-zA-Z0-9_]+$/'];
Is there a way to add a rule that requires the player_tag
field to contain at least 1 alpha character (a-zA-Z
)?
Passwords can contain alpha or numeric characters (No special characters). A password must begin with an alphabetic character. Passwords are a minimum of 5 characters and a maximum of 8 characters.
An alphanumeric example are the characters a, H, 0, 5 and k. These characters are contrasted to non-alphanumeric ones, which are anything other than letters and numbers. Examples of non-alphanumeric numbers include &, $, @, -, %, *, and empty space.
“An Alpha is a leader; she is self-assured, powerful and confident in everything she does,” says Spencer. “These personality types don't hold back, tending to steer the pack in friendships and powerfully lead their teams in work.
Non-alphanumeric characters are characters that are not numbers (0-9) or alphabetic characters. Alphabetic characters are defined as a-z, A-Z, and alphabetic characters in the Latin-1 code page 850.
This might help you:
^(?=.*[a-zA-Z]).+$
Here is a working example: https://regex101.com/r/gD3gR6/2
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