Showing posts with label validation. Show all posts
Showing posts with label validation. Show all posts

Thursday, June 30, 2016

Email Validation PHP Script

This class allows the developer to validate e-mail addresses according to RFC 5321, RFC 5322, or custom requirements. It can also check to see if the domain can be resolved to MX RRs. If validating according to the more expansive RFC 5322, e-mail addresses may contain one of a dot-atom, a quoted string, or an obsolete local-part, either a domain name or a domain literal (IPv4, IPv6, or IPv4-mapped IPv6 address) domain, and nested CFWS (comments and folding white spaces).


Download Email Validation PHP Script

Tuesday, May 24, 2016

A simple Validation Form in PHP

Today I am going to share a simple script in PHP which does the validation when user registers with your site.It is a very simple one and aimed at a complete newb.I am not going to discuss much about the script as it is pretty much self explanatory.The script is given below:

<?php 
}
else {
$usr = new Users;
$usr->storeFormValues( $_POST );
$n6 = 6;

if( $_POST[password] == $_POST[cpassword] ) {
echo $usr->register($_POST);
}
else {
echo "Password and Confirm password not match";
}

if( $_POST[username] < $n6 ) {
echo "Username must be more than 6 characters.";
}
else {
echo $usr->register($_POST);
}

if( $_POST[password] < $n6 ) {
echo "Password must be more than 6 characters.";
}
else {
echo $usr->register($_POST);
}
}
?>
Thats it with it.You may change it according to your needs.Besides, if your are working on a Registration form then you will also find the Login Form in PHP interesting.

Enjoy!

Tuesday, May 17, 2016

Simple HTML Form Validation using jQuery

We have seen server side form validation using PHP and Client Side Validation using HTML5, and there is also another way to validate HTML forms using jQuery, you can set user defined error messages and it's easy to handle form validations using jQuery, so this tutorial will show you that how to use jQuery to validate forms, we must validate the forms either client side or server side to store and get authenticate details from the users, so this one is also easy to implement in your webpage forms, so take a quick look at this tutorial.
Simple HTML Form Validation using jQuery
Read more »