Skip to main content

Posts

Showing posts from June, 2015

Form Validation in Angular.js - Quick and Simple method On Submit click - HTML5 Validation vs AngularJs Validation

Form Validation Before AngularJs:  Validation done in java script or mostly with JQuery Validation . JQuery Validation uses Html 'Class' attribute of any Html element to implement Validations, like Class = " required  " And there were many different libraries to do simple and fancy validation - highlights in JQuery.  HTML5 Validation: In HTML5 you can add many element types and attributes like below to a HTML element for validations. InputTypes: email, url, number, color , date, datetime, datetime-local, month, search, tel, time, week, range Ex:  Date: <input type="date" name="date" required>  this will show a text box with a dropdown arrow for 'DatePicker' provided by the HTML5 supported browsers. Attributes:    required, pattern, placeholder, max, min, size,  All these validations and required fields are enforced by the HTML5 supported Browsers when you click on Submit button. Submit button OnClick - event will ...