public function __construct($error_message = '') { if (empty($error_message)) { $error_message = LangLoader::get_message('form.doesnt_match_picture_file_regex', 'status-messages-common'); } $this->set_validation_error_message($error_message); parent::__construct(self::$regex, self::$regex, $error_message); }
public function __construct($error_message = '') { if (empty($error_message)) { $error_message = LangLoader::get_message('form.doesnt_match_tel_regex', 'status-messages-common'); } $this->set_validation_error_message($error_message); parent::__construct(self::$regex, TextHelper::to_js_string(self::$js_regex), $error_message); }
public function __construct($error_message = '') { if (empty($error_message)) { $error_message = LangLoader::get_message('form.doesnt_match_mail_regex', 'status-messages-common'); } $this->set_validation_error_message($error_message); $mail_service = AppContext::get_mail_service(); $regex = $mail_service->get_mail_checking_regex(); parent::__construct($regex, $regex, $error_message); }
public function __construct($error_message = '') { switch (SecurityConfig::load()->get_internal_password_strength()) { case SecurityConfig::PASSWORD_STRENGTH_STRONG: $regex = self::$strong_strength_regex; $error_message = empty($error_message) ? LangLoader::get_message('form.doesnt_match_strong_password_regex', 'status-messages-common') : $error_message; break; case SecurityConfig::PASSWORD_STRENGTH_MEDIUM: $regex = self::$medium_strength_regex; $error_message = empty($error_message) ? LangLoader::get_message('form.doesnt_match_medium_password_regex', 'status-messages-common') : $error_message; break; default: $regex = self::$weak_strength_regex; break; } $this->set_validation_error_message($error_message); parent::__construct($regex, $regex, $error_message); }