Basicis - Core

Logo

As the name says, it is made to be basic and direct.

View the Project on GitHub basicis/core

Basicis\Core\Validator

Validator Class

Methods

| Name | Description | |——|————-| |__construct|Function __construct| |bool|Function bool| |boolean|Function boolean| |compareHash|Function compareHash| |confirmPass|Function confirmPass| |email|Function email| |endWith|Function endWith| |execMethod|Function execMethod| |exists|Function exists| |float|Function float| |flt|Function flt Another alternative to the float function| |has|Function has| |hasKey|Function hasKey| |int|Function int Another alternative to the integer function| |integer|Function integer| |isNull|Function isNull| |max|Function max| |maxCount|Function maxcount| |maxLen|Function maxlen| |min|Function min| |minCount|Function mincount| |minLen|Function minLen| |noExists|Function noexists| |noIsNull|Function noIsNull| |startWith|Function startWith| |str|Function str Another alternative to the string function| |string|Function string| |url|Function url| |validArray|Function validArray| |validString|Function validString| |validate|Function validate Validate a string or array as first param, with regex as second params

Validations

  • bool
  • boolean
  • compareHash
  • confirmPass
  • email
  • endWith
  • execMethod
  • exists
  • float
  • flt
  • has
  • hasKey
  • int
  • integer
  • isNull
  • maxCount
  • maxLen
  • minCount
  • minLen
  • min
  • max
  • noExists
  • noIsNull
  • startWith
  • str
  • string
  • url Using Validations ```php $result = Validator::validate(“My Text”, “string|minLen:6”); //$result = true;|

Validator::__construct

Description

public __construct (string $class)

Function __construct

Parameters

Return Values

void


Validator::bool

Description

public bool (mixed $arg)

Function bool

Parameters

Return Values

object


Validator::boolean

Description

public boolean (mixed $arg)

Function boolean

Parameters

Return Values

object


Validator::compareHash

Description

public compareHash (mixed $arg)

Function compareHash

Parameters

Return Values

object


Validator::confirmPass

Description

public confirmPass (array $arg)

Function confirmPass

Parameters

Return Values

object


Validator::email

Description

public email (mixed $arg)

Function email

Parameters

Return Values

object


Validator::endWith

Description

public endWith (mixed $arg)

Function endWith

Parameters

Return Values

object


Validator::execMethod

Description

public execMethod (string $method, mixed $arg)

Function execMethod

Parameters

Return Values

bool


Validator::exists

Description

public exists (array $arg)

Function exists

Parameters

Return Values

object


Validator::float

Description

public float (mixed $arg)

Function float

Parameters

Return Values

object


Validator::flt

Description

public flt (mixed $arg)

Function flt Another alternative to the float function

Parameters

Return Values

object


Validator::has

Description

public has (mixed $arg)

Function has

Parameters

Return Values

object


Validator::hasKey

Description

public hasKey (mixed $arg)

Function hasKey

Parameters

Return Values

object


Validator::int

Description

public int (mixed $arg)

Function int Another alternative to the integer function

Parameters

Return Values

object


Validator::integer

Description

public integer (mixed $arg)

Function integer

Parameters

Return Values

object


Validator::isNull

Description

public isNull (mixed $arg)

Function isNull

Parameters

Return Values

object


Validator::max

Description

public max (string|array $arg)

Function max

Parameters

Return Values

object


Validator::maxCount

Description

public maxCount (mixed $arg)

Function maxcount

Parameters

Return Values

object


Validator::maxLen

Description

public maxLen (mixed $arg)

Function maxlen

Parameters

Return Values

object


Validator::min

Description

public min (string|array $arg)

Function min

Parameters

Return Values

object


Validator::minCount

Description

public minCount (mixed $arg)

Function mincount

Parameters

Return Values

object


Validator::minLen

Description

public minLen (mixed $arg)

Function minLen

Parameters

Return Values

object


Validator::noExists

Description

public noExists (array $arg)

Function noexists

Parameters

Return Values

object


Validator::noIsNull

Description

public noIsNull (mixed $arg)

Function noIsNull

Parameters

Return Values

object


Validator::startWith

Description

public startWith (mixed $arg)

Function startWith

Parameters

Return Values

object


Validator::str

Description

public str (mixed $arg)

Function str Another alternative to the string function

Parameters

Return Values

object


Validator::string

Description

public string (mixed $arg)

Function string

Parameters

Return Values

object


Validator::url

Description

public url (mixed $arg)

Function url

Parameters

Return Values

object


Validator::validArray

Description

public validArray (array $data, array $validations)

Function validArray

Parameters

Return Values

object


Validator::validString

Description

public validString (string $data, string $validations)

Function validString

Parameters

Return Values

void


Validator::validate

Description

public static validate (string|array $data, string|array $validations, string $class)

Function validate Validate a string or array as first param, with regex as second params

Validations

  • bool
  • boolean
  • compareHash
  • confirmPass
  • email
  • endWith
  • execMethod
  • exists
  • float
  • flt
  • has
  • hasKey
  • int
  • integer
  • isNull
  • maxCount
  • maxLen
  • minCount
  • minLen
  • min
  • max
  • noExists
  • noIsNull
  • startWith
  • str
  • string
  • url Using Validations ```php $result = Validator::validate(“My Text”, “string|minLen:6”); //$result = true;

$result = Validator::validate(“My Text”, “string|minLen:2|maxLen:4”);
//$result = false;

Parameters

Return Values

bool