Location: PHPKode > scripts > Validations > validations/valtest.php
<?php
require("validations.inc.php");

$val=new Validation;

if($val->is_email($_POST['email']))
	echo "Email is Valid!";
else
	echo "Not a valid email";
echo "<br>";

if($val->is_number($_POST['number']))
	echo "number is Valid!";
else
	echo "Not a valid number";
echo "<br>";

if($val->is_alpha_numeric($_POST['String']))
	echo "String is Valid!";
else
	echo "Not a valid String";
echo "<br>";
if($val->is_date($_POST['date'])>0)
	echo "date is Valid!";
else
	echo "Not a valid date";
echo "<br>";

?>
<FORM name='form1' method='post' action="">
<table>
<tr><td>Enter Email :</td><td><input name='email'></td></tr>
<tr><td>Enter Number :</td><td><input name='number'></td></tr>
<tr><td>Enter Date :</td><td><input name='date'>(mm-dd-yyyy)</td></tr>
<tr><td>Enter String :</td><td><input name='String'></td></tr>
<tr><td>Press Submit :</td><td><input name='Submit' type='submit'></td></tr>
</table>
</FORM>
Return current item: Validations