
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Client side validation with HTML and without JavaScript
To display HTML5 client-side validation error bubbles, use the required attribute.
You do not need to have javascript for client side validations like empty text box would never be submitted because HTML5 introduced a new attribute called required which would be used as follows and would insist to have a value:
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Enter email : <input type="text" name = "newinput" required/> <p>Try to submit using Submit button</p> <input type = "submit" value = "submit" /> </form> </body> </html>
- Related Articles
- Client-side image processing with HTML
- How to display HTML5 client-side validation error bubbles?
- Set PIN validation with JavaScript?
- How to use JavaScript to create client-side image map?
- How to use the tag to define client-side JavaScript?
- MySQL Client Server-Side Help
- How to specify an image as a client-side image-map in HTML?
- Client side image zooming and rotating in Django
- Difference between Client-side filter and Server-side filters in Cyber Security
- How to create a password validation form with CSS and JavaScript?
- Is HTML 5 validation useful?
- Verification and Validation with Example
- Using client side XSLT transformations in HTML5
- What is client-side rendering in React?
- How to add form validation for empty input fields with JavaScript?

Advertisements