1
General Discussion / Re: PHPRAD still exist or dying ?
(I've just downloaded 2.5.8, but will wait to hear from others as to it's bug fixes)
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
I see Roles and Users as two menu items in your application. Have you created a separate table for Roles? Are you providing dynamic role creation? How you achieved that with PHPRad?
/**
* Determine if the provided value is a valid phone number.
*
* Usage: '<index>' => 'phone_number'
*
* @param string $field
* @param array $input
*
* @return mixed
*
* Examples:
*
* 555-555-5555: valid
* 5555425555: valid
* 555 555 5555: valid
* 1(519) 555-4444: valid
* 1 (519) 555-4422: valid
* 1-555-555-5555: valid
* 1-(555)-555-5555: valid
*/
protected function validate_phone_number($field, $input, $param = null)
{
if (!isset($input[$field]) || empty($input[$field])) {
return;
}
$regex = '/^(\d[\s-]?)?[\(\[\s-]{0,2}?\d{3}[\)\]\s-]{0,2}?\d{3}[\s-]?\d{4}$/i';
if (!preg_match($regex, $input[$field])) {
return array(
'field' => $field,
'value' => $input[$field],
'rule' => __FUNCTION__,
'param' => $param,
);
}
}