MediaWiki fundraising/REL1_35
EmployerFieldValidation Class Reference
Inheritance diagram for EmployerFieldValidation:
Collaboration diagram for EmployerFieldValidation:

Public Member Functions

 getClientSideValidation ( $normalized, &$clientRules)
 Adds rules and error messages to $clientRules for use in client-side validation.
 
 validate (GatewayType $unused, $normalized, &$errors)
 Rudimentary tests of Employer field to ensure right format.
 

Static Protected Attributes

static $key = 'employer'
 

Detailed Description

Definition at line 3 of file EmployerFieldValidation.php.

Member Function Documentation

◆ getClientSideValidation()

EmployerFieldValidation::getClientSideValidation ( $normalized,
& $clientRules )

Adds rules and error messages to $clientRules for use in client-side validation.

Rule keys: 'required' when true, check that the field is not empty 'pattern' field value must match this regular expression 'message' error message to display if this rule fails

Parameters
array$normalizedThe gateway's normalized donation data
array&$clientRulesAssociates field keys with lists of rules

Implements ClientSideValidationHelper.

Definition at line 33 of file EmployerFieldValidation.php.

References $key.

◆ validate()

EmployerFieldValidation::validate ( GatewayType $unused,
$normalized,
& $errors )

Rudimentary tests of Employer field to ensure right format.

Parameters
GatewayType$unused
array$normalizedNormalized donation data
ErrorState&$errorsResults of validation to this point

Implements ValidationHelper.

Definition at line 14 of file EmployerFieldValidation.php.

References $key, DataValidator\cc_number_exists_in_str(), and DataValidator\getError().

Member Data Documentation

◆ $key

EmployerFieldValidation::$key = 'employer'
staticprotected

Definition at line 5 of file EmployerFieldValidation.php.

Referenced by getClientSideValidation(), and validate().


The documentation for this class was generated from the following file: