What is the validation?

Posted on

What is the validation??

Validations use to stop fill the unwanted data from the user. It reduce the inconsistency data its accept the correct data from the user.all most every website use the validation in their forms like blank text box age limit email address,address text confirm password and many more.

These validations have two types :

1. Client side validation

2. Server side validation

3. Mix validation

Client side validation:

The validation which is use in the client side is known as client side validation this validation is apply in html5, JavaScript and jQuery. User can see the validation and stop the validation by through the inspect element. and user can disable the JavaScript and jQuery stop the validation.

Validation in html5

<input type=”text” name=”textbox1” placeholder=”Enter the value” required /> Html5 required validation is use to stop the submit without fill the required field.

Required Validation in java script:

<input type=”text” name=”textbox1” placeholer=”Enter the value” id=”text_val”/>

Function vali_form()

{

}

Validation in jquery:

$(“#btn”).click(function(){

Var text1=$(“#text_val”).val();

If(text1==””)

});

Server side validation:

The server side validation is done in server side language like in php java c c++ c# and .NET they cant be change by the inspect element if any one want change the validation of server side he/she have to break the protocols.

Here I show you required validation in php

<form action=”<?php $_SERVER[‘PHP_SELF’]; ?>” method=”post”>

<input type=”text” name=”text1” placeholder=”Enter the value”>

<input type=”submit” value=”submit” name=”submit”>

</form>

<?php

If(isset($_POST[‘submit’]))

{

Echo “Enter the value in Text Box ”;

}

} ?>

There are more validations like phone number length is must be 10 and pin-code length and phone number only accept the number.

Mix validation:

This validation is the combo of client side and the server side validation. We are use jquery from client and php from server side with the help of ajax we check the value is validate or not all.like in gmail register from we enter the email it tell us is valid or not its work with both jquery and server side language.

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.

Helpline: 9814666333, 8699444666

Email:info@technocampus.co.in

**************************************************************************************************************

Please fill the FORM and we shall contact you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s