custom validation in a lightning component -- w3web.net

Custom Validation in a Lightning Input Field on Click Button

Hey guys, today in this post we are going to learn about How to create a form and validate all fields on a single click of button in lightning component.

Why are validation rules used?

We use form validation whenever we need to input information that is expected to some requirement from user.

There are two type of validation rule standards:- Server Side Validation and Client Side Validation.

Server Side Validation:- It is performed by server side. When we click on a button the button functionality call a method that is connected through server and it’s get all information from server.

Client Side Validation:- Client side validation performed by JavaScript function. Where does not need to connect to server. It is working very fast because it helps to reduce the server side lode.

In this example I am creating a client side validation. So go through the below points step by step.

Form Validation - w3web.net

Other related post that would you like to learn

Step:-1

formValidationCmp.cmp [Lightning Component]

Step:-2

formValidationCmpController.js [JavaScript File]

Step:-3

formValidationCmp.css [Style CSS File]

Related further post that you want to learn

2 thoughts on “Custom Validation in a Lightning Input Field on Click Button”

Leave a Comment

Contribute to Support If Some Value Added in Your Project or Website