O'Reilly logo

concrete5 for Developers by Sufyan bin Uzayr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validating user inputs

Now that we have learned how to create blocks and have also gained a good understanding of the MVC approach in concrete5, the next step is to validate user inputs because in all likelihood, the most important blocks are ones that seek user inputs, generally in forms such as the contact form that we created previously.

As is obvious, when it comes to validating user inputs within the browser, we can rely on HTML5 and jQuery. In the next example, I will be using e-mail inputs for demonstration purposes, but you can, of course, remodel to input other fields, such as URLs, numbers, and so on. Note that validation on the client side is generally considered not secure and you might be better off validating the user input coming ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required