Copied!

Autogenerated. Do not modify. Modify SQL table, then run oneOffScripts\generateValidators.php table_name

CloneableInstantiable
Properties
public static array PHPFUI\ORM\Validator::$dateSeparators = ['-', '.', '_', ':', '/']
 
  • var string[]
public static array $validators = ['ran' => ['required', 'datetime']]
 
  • var array<string,string[]>
Methods
public __construct(PHPFUI\ORM\Record\Migration $record)
public PHPFUI\ORM\Validator::getErrors() : array
 

Return any errors.

  • return array<string,string[]> indexed by field(s) with error and array of translated errors.
public PHPFUI\ORM\Validator::validate(string $optionalMethod = '') : bool
 

Return true if the entire record validates

  • param string $optionalMethod will be called if it matches an existing method. This can be used to more complex checks that need more involved validations. The optionalMethod overrides the normal validation, so if you want the normal validations, the optionalMethod will need to call the validate function again itself without the optionalMethod parameter.
  • return bool true if valid
Properties
protected string PHPFUI\ORM\Validator::$currentField = ''
protected array PHPFUI\ORM\Validator::$currentFieldDefinitions = []
 
  • var array<int,array>
protected bool PHPFUI\ORM\Validator::$currentNot = false
protected array PHPFUI\ORM\Validator::$currentParameters = []
 
  • var string[]
protected bool PHPFUI\ORM\Validator::$currentRequired = false
protected array PHPFUI\ORM\Validator::$fieldDefinitions = []
 
  • var array<string,array>
protected ?PHPFUI\ORM\Record PHPFUI\ORM\Validator::$originalRecord
protected PHPFUI\ORM\Record PHPFUI\ORM\Validator::$record
Methods
protected PHPFUI\ORM\Validator::testIt(bool $condition, string $token, array $values = []) : string
 
  • param array<string,mixed> $values
Properties
public static array PHPFUI\ORM\Validator::$dateSeparators = ['-', '.', '_', ':', '/']
 
  • var string[]
public static array $validators = ['ran' => ['required', 'datetime']]
 
  • var array<string,string[]>
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration