Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Bootstrap 4

You're reading from   Mastering Bootstrap 4 Learn how to build beautiful and highly customizable web interfaces by leveraging the power of Bootstrap 4

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781783981120
Length 286 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Form validation


Although this book does not cover the server-side logic required to make this happen, we will need to implement one last essential stepping stone, client-side form validation. In other words, what is currently missing from our form, aside from the server-side code to send or store the actual message, is a way for us to validate the user's form input and to notify the user should they fill out the form incorrectly. One obvious solution is to identify what type of input the form fields require, and then to use either plain JavaScript or jQuery to check the contents of each field using regular expressions. Once an expression fails to match, we could then set the contents of a specific HTML element to contain an error message. However, do we really need to implement all this from scratch? The short answer is no . Form validation is a well explored area within web development. Consequently, there exist plenty of third-party JavaScript libraries that allow us to implement form...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime