Which Is Better For Form Validation - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Which Is Better For Form Validation (1076 Views)
| Which Is Better For Form Validation by Nobody: 6:13am On Nov 28, 2018 |
To Web developers in the house, which is better for form validation, Php (back-end) or javascript(front-end)? |
| Re: Which Is Better For Form Validation by Nobody: 10:03am On Nov 28, 2018 |
both |
| Re: Which Is Better For Form Validation by Nobody: 4:00pm On Nov 28, 2018 |
charliboy654:Let me just start with this, whatever you do you should have some sort of server validation in place. Js validation is extremely useful from a ux point of view. Users don't need to submit the form first before being notified of validation errors and this makes for a wonderful user experience. but js runs on the client and you usually have no control over this. The user might have js disabled and thus your script won't run and he will bypass the validation process or advanced users can manipulate the script and temper with the validation rules. php validation should serve as your last guard to user submitted content as this runs on the server and the user can't turn it off or manipulate. so the answer is both have their places. js is used to improve ux while php ensures that the right data is stored. if you were to pick one though, definitely php |
| Re: Which Is Better For Form Validation by Nobody: 5:33pm On Nov 28, 2018 |
eberedigital:OK, thank u very much, am a new developer actually using javascript for form validation until a friend told me php would be safer which actually made sense, but I felt javascript would be better for user experience. |
| Re: Which Is Better For Form Validation by ensodev(m): 10:46pm On Nov 28, 2018 |
eberedigital:My oga said it all... |
How To Create Mysql Database/python Tkinter Gui To Change Password/Validation En • Reactive Forms And Form Validation In Angular With Example • Simple Form Validation In Reactjs Example • 2 • 3 • 4
Top Rated Shop By Brand Magento 2 Extensions For E-commerce Stores • Introducing Devsonar.com, a directory of Web, Android and iOS Developers • Countries With The Best Developers