- Maximum/Minimum number of characters
- Field validation
I suggest an advanced option of allowing a regex (with preg_match()) to be defined for it.
So that you have greater flexibility in limiting the fields.
Example case:
Users are supposed to only be able to enter a Steam ID.
- starts with STEAM_0:
- followed by either a 0 or 1.
- followed by a :
- followed by an integer 3 to 8 numbers in length.
Example: STEAM_0:1:1579421
Code: Select all
$re = "/^STEAM_0:[01]:[0-9]{3,8}$/"