Users often send many meaningless characters such as "Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
Is there any way to prohibit it? Either js or php is fine.
Thanks
Regular judgment
Send a JS test picture:
Note:
The- u
modifier after the
regular is used to support Unicode wide characters
{3,}
means matching 3 times or more. Since the previous(.)
has already been matched once, the entire limited number is 1 greater than this number. In addition, this number can be changed according to your own needs.