Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: regular expression to check if the textbox contains only special characters

by Your Mother (Archbishop)
on Oct 18, 2016 at 12:20 UTC ( [id://1174200]=note: print w/replies, xml ) Need Help??


in reply to Re: regular expression to check if the textbox contains only special characters
in thread regular expression to check if the textbox contains only special characters

This is interesting and worth mentioning but needs a clear caveat that the backend has no idea whether the data came from an HTML5 browser or a hacker/hackbot that bypassed the filter completely. Client side validation is for courtesy, speed, saving unnecessary server load. All data must be validated on the backend/server regardless of what the front end does.

I also think it borders or a poor practice because the best code would use the same regex on the front and back end to avoid silly bugs and the backend has much more power to offer so will be hobbled by the subset the front end can do.

  • Comment on Re^2: regular expression to check if the textbox contains only special characters

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1174200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found