Skip to content

ValidationNamedCheckException.md

Craig Manley edited this page Feb 17, 2016 · 5 revisions

Validate\ValidationNamedCheckException

Extends the Validate\ValidationCheckException class with a custom contructor and getName() accessor method. Used for throwing exceptions about failed validations for which the name is known.

The following classes and methods throw this exception:

Methods

__construct

__construct(string $name, string $check, mixed $value, string $message = null)

Constructor.

Arguments

  • $name string - the checked parameter/key/field name
  • $check string - name of the check that failed
  • $value mixed - the value that isn't valid
  • $message string - optional custom message; if not given, then a generic message is created based on the other arguments

getName

string getName()

Returns the name of the parameter/key/field that caused the failure.