public static function AcquiaLiftAPI::codeIsValid in Acquia Lift Connector 7
Determines whether the passed in string is valid as an owner code.
Parameters
$str: The string to check
Return value
bool Returns FALSE if the string contains any invalid characters, TRUE otherwise.
2 calls to AcquiaLiftAPI::codeIsValid()
- AcquiaLiftAPI::getInstance in includes/
acquia_lift.classes.inc - Singleton factory method.
- acquia_lift_admin_form_validate in ./
acquia_lift.admin.inc - Validation callback for the Acquia Lift admin form.
File
- includes/
acquia_lift.classes.inc, line 252 - Provides an agent type for Acquia Lift
Class
- AcquiaLiftAPI
- @file Provides an agent type for Acquia Lift
Code
public static function codeIsValid($str) {
return (bool) preg_match('/^' . self::VALID_NAME_MATCH_PATTERN . '+$/', $str);
}