Added mobile number validation functionality
This commit is contained in:
@@ -101,6 +101,18 @@ function _valid_phone_number($input)
|
||||
*/
|
||||
}
|
||||
|
||||
function _valid_australian_mobile_number($input)
|
||||
{
|
||||
if (preg_match('/^\s*(?:\+61|61|0061|0)(\d{3})\s*(\d{3})\s*(\d{3})\s*$/', $input, $matches))
|
||||
{
|
||||
watchdog('booking', 'Australian Mobile Number "!passnum" validates since it passed our regexp',
|
||||
array('!passnum' => $input));
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to check whether the number of registrations for the current event have reached their defined maximum size
|
||||
|
Reference in New Issue
Block a user