Exponent v2.7.2

expValidator
in package

This is the class expValidator

Tags
subpackage

Subsystems

Table of Contents

acceptance_of()  : mixed
Checks if object field is set (boolean true)
alphanumericality_of()  : mixed
Checks if object field contains an alphanumeric value
check_antispam()  : bool
Checks validity of recaptcha antispam entry
checkPasswordStrength()  : string
Method to determine password strength e.g., not correct type/number of characters
checkUsername()  : string
Routine to check that username is valid (longer than 3 characters)
confirmation_of()  : mixed
failAndReturnToForm()  : mixed
Routine to note error and return to the filled out form with messages
flashAndReturnToForm()  : mixed
Routine to error and return to the filled out form with flash message
format_of()  : mixed
generatePassword()  : string
Generate a random secure password
is_valid_email()  : mixed
Checks if object field contains a valude email address
is_valid_phonenumber()  : mixed
Checks if object field contains a valid phone number
is_valid_sef_name()  : mixed
Checks if object field contains a valid sef name
is_valid_state()  : bool|string
Checks if object field contains a valid state abbreviation
is_valid_zipcode()  : mixed
Checks if object files contains a valid zipcode
isValidEmail()  : bool
Validate an email address.
length_of()  : mixed
Checks if object field is minimum length
numericality_of()  : mixed
Checks if object field contains an numeric value
presence_of()  : mixed
Checks if object field contains a value (not empty)
setErrorField()  : mixed
Routine to mark which form field had the error
uniqueness_of()  : mixed
Check for uniqueness of object field amongst all items in table
uploadSuccessful()  : mixed
Determines if upload was successfully inserted into 'file' table
validate()  : bool
All purpose validation method
validate_email_address()  : bool
Wrapper function to validate email address
value_between()  : mixed
Checks if object field value is between two limits

Methods

acceptance_of()

Checks if object field is set (boolean true)

public static acceptance_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

alphanumericality_of()

Checks if object field contains an alphanumeric value

public static alphanumericality_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

check_antispam()

Checks validity of recaptcha antispam entry

public static check_antispam( $params[, string $msg = "" ]) : bool
Parameters
$params :
$msg : string = ""
Return values
bool

checkPasswordStrength()

Method to determine password strength e.g., not correct type/number of characters

public static checkPasswordStrength( $password) : string
Parameters
$password :
Return values
string

error if any

checkUsername()

Routine to check that username is valid (longer than 3 characters)

public static checkUsername( $username) : string
Parameters
$username :
Return values
string

confirmation_of()

public static confirmation_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

failAndReturnToForm()

Routine to note error and return to the filled out form with messages

public static failAndReturnToForm([string|array<string|int, mixed> $msg = '' ][, null $post = null ]) : mixed
Parameters
$msg : string|array<string|int, mixed> = ''
$post : null = null
Return values
mixed

flashAndReturnToForm()

Routine to error and return to the filled out form with flash message

public static flashAndReturnToForm([string $queue = 'message' ][,  $msg = '' ][, null $post = null ]) : mixed
Parameters
$queue : string = 'message'
$msg : = ''
$post : null = null
Return values
mixed

format_of()

public static format_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

generatePassword()

Generate a random secure password

public static generatePassword([string $len = MIN_PWD_LEN ][, string $cap = MIN_UPPER ][, string $num = MIN_DIGITS ][, string $sym = MIN_SYMBOL ]) : string
Parameters
$len : string = MIN_PWD_LEN
$cap : string = MIN_UPPER
$num : string = MIN_DIGITS
$sym : string = MIN_SYMBOL
Return values
string

is_valid_email()

Checks if object field contains a valude email address

public static is_valid_email( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

is_valid_phonenumber()

Checks if object field contains a valid phone number

public static is_valid_phonenumber( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

is_valid_sef_name()

Checks if object field contains a valid sef name

public static is_valid_sef_name( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

is_valid_state()

Checks if object field contains a valid state abbreviation

public static is_valid_state( $field,  $object,  $opts) : bool|string
Parameters
$field :
$object :
$opts :
Return values
bool|string

is_valid_zipcode()

Checks if object files contains a valid zipcode

public static is_valid_zipcode( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

isValidEmail()

Validate an email address.

public static isValidEmail( $email) : bool

Provide email address (raw input) Returns true if the email address has the email address format and the domain exists.

Parameters
$email :
Return values
bool

length_of()

Checks if object field is minimum length

public static length_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

numericality_of()

Checks if object field contains an numeric value

public static numericality_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

presence_of()

Checks if object field contains a value (not empty)

public static presence_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

setErrorField()

Routine to mark which form field had the error

public static setErrorField( $field) : mixed
Parameters
$field :
Return values
mixed

uniqueness_of()

Check for uniqueness of object field amongst all items in table

public static uniqueness_of( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

uploadSuccessful()

Determines if upload was successfully inserted into 'file' table

public static uploadSuccessful( $file) : mixed
Parameters
$file :
Tags
deprecated
Return values
mixed

validate()

All purpose validation method

public static validate( $vars,  $post) : bool
Parameters
$vars :
$post :
Return values
bool

validate_email_address()

Wrapper function to validate email address

public static validate_email_address( $email) : bool
Parameters
$email :
Return values
bool

value_between()

Checks if object field value is between two limits

public static value_between( $field,  $object,  $opts) : mixed
Parameters
$field :
$object :
$opts :
Return values
mixed

Search results