Jump to content

[SOLVED] Validate Minimum Of Numbers In A Test Filed


phpretard

Recommended Posts

I have a text field that is allowed numbers and text but it should contain at least 7 numbers.

 

 

This is how I would validate for 7 number only but I need at least 7 numbers and text optional.

 


<?
if (($var=='')||(strlen($var) < 7)||(!is_numeric($var))){

$message="Missing Numbers";

}
?>

 

Thank you!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.