Validation

Provide valuable, actionable feedback to your users with HTML5 form validation–available in all our supported browsers.

How To

  1. Step 1: Include LambdaEx Framework in Logi Info Application. Include LambdaEx Framework in Logi Info Application.

How it works

Here’s how form validation works with Bootstrap:

  • HTML form validation is applied via CSS’s two pseudo-classes, :invalid and :valid. It applies to <input>, <select>, and <textarea> elements.
  • Bootstrap scopes the :invalid and :valid styles to parent .was-validated class, usually applied to the <form>. Otherwise, any required field without a value shows up as invalid on page load. This way, you may choose when to activate them (typically after form submission is attempted).
  • As a fallback, .is-invalid and .is-valid classes may be used instead of the pseudo-classes for server side validation. They do not require a .was-validated parent class.
  • Due to constraints in how CSS works, we cannot (at present) apply styles to a <label> that comes before a form control in the DOM without the help of custom JavaScript.
  • Feedback messages may utilize the browser defaults (different for each browser, and unstylable via CSS) or our custom feedback styles with additional HTML and CSS.
  • You may provide custom validity messages with setCustomValidity in JavaScript.
Default
Example
First name
Please provide a valid first name.
Last name
Please provide a valid last name.
Email
Please provide a valid email.
Text Area
Was Validated
Example

Set .required class as validation field by adding $('.required').attr('required','required').unwrap().removeClass('required');.

First name
Please provide a valid first name.
Last name
Please provide a valid last name.
Email
Please provide a valid email.
Text Area