Hello, friends in my previous post I show you an opencart trick but in this post I will show you all types of php validation script for input fields. Here I create a specific function for every types of validation like email address, name, url, zip code, USA zip code, UK zip code, social security number, international phone number, US phone number, Indian phone number, credit card number, credit card expiry date, integer, float, string etc. The PHP Validation script is a set of validation rules which lets you add server-side validation to your forms quickly and with as little effort as possible. So lets build the php validation script.

Validate an integer




Validate a float

Validate a string

Validate only alphabetic characters

Validate alphabetic and numeric characters

Validate a credit card number

Validate a credit card expiry date

Validate an Indian phone number

Validate US phone number

Validate international phone number

Validate U.S. Social Security number

Validate a zip code

Validate UK zip code

Validate a US zip code

Validate an e-mail address

Validate a URL

Validate an IP address

Thank you for viewing my blog. Please comment and share if you like my post.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
php validation script for input fields
  • Arvind

    Share date validation for mm-dd-yyyy, yyyy-mm-dd and datetime validation in php.