Properties

$regex_safe

$regex_safe : string

Type

normal

$regex_username_safe

$regex_username_safe : string

Type

normal

$regex_phone_number

$regex_phone_number : string

Type

normal

Methods

__construct()

__construct() : mixed

Validation constructor.

Returns

mixed

validate_files()

validate_files( $files) : mixed

Validate files before upload

Parameters

$files

Returns

mixed

validate_fields_values()

validate_fields_values(mixed  $changes, mixed  $args, mixed  $form_data) : mixed

Parameters

mixed $changes
mixed $args
mixed $form_data

Returns

mixed

remove_html()

remove_html( $string) : string

Removes html from any string

Parameters

$string

Returns

string

normalize()

normalize( $string) : mixed

Normalize a string

Parameters

$string

Returns

mixed

safe_name_in_url()

safe_name_in_url( $name) : mixed|string

Safe name usage ( for url purposes )

Parameters

$name

Returns

mixed|string

strong_pass()

strong_pass(string  $candidate) : bool

Password strength test

Parameters

string $candidate

Returns

bool

safe_username()

safe_username( $string) : bool

Space, dash, underscore

Parameters

$string

Returns

bool

safe_string()

safe_string( $string) : bool

Dash and underscore (metakey)

Parameters

$string

Returns

bool

is_phone_number()

is_phone_number( $string) : bool

Ss phone number

Parameters

$string

Returns

bool

is_discord_id()

is_discord_id( $string) : bool

Is Discord ID?

Parameters

$string

Returns

bool

is_url()

is_url( $url, bool  $social = false) : bool

Is url

Parameters

$url
bool $social

Returns

bool

randomize()

randomize(int  $length = 10) : string

Get a random string

Parameters

int $length

Returns

string

generate()

generate(int  $length = 40) : string

Generate a password, hash, or similar

Parameters

int $length

Returns

string

random_number()

random_number(bool  $len = false) : int|string

Random numbers only

Parameters

bool $len

Returns

int|string

validate_date()

validate_date( $date, string  $format = 'YYYY/MM/D') : bool

To validate given date input

Parameters

$date
string $format

Returns

bool