Class FileMaker_Error_Validation

Description

Extension of FileMaker_Error for adding additional information about validation errors.

Located in /FileMaker/Error/Validation.php (line 27)

PEAR_Error
   |
   --FileMaker_Error
      |
      --FileMaker_Error_Validation
Method Summary
void addError (FileMaker_Field $field, integer $rule, string $value)
array getErrors ([string $fieldName = null])
boolean isValidationError ()
integer numErrors ()
Methods
addError (line 44)

Add an error.

void addError (FileMaker_Field $field, integer $rule, string $value)
  • FileMaker_Field $field: The field object that validation failed on.
  • integer $rule: The validation rule that failed.
  • string $value: The value that failed validation.
getErrors (line 88)

Returns an array of arrays describing the validation errors

that occurred. Each entry in the outer array represents an individual validation failure. Each failure is represented by a three-element array with the following members:

  1. => The field object for the field that had the validation problem.
  2. => The validation rule that failed for that field (a FILEMAKER_RULE_* constant).
  3. => The invalid value.
Multiple validation rules can fail on a single field. If the optional $fieldName parameter is set, then only failures for that individual field will be returned.

  • return: Validation error details.
array getErrors ([string $fieldName = null])
  • string $fieldName: Get errors only for this field name.
isValidationError (line 55)

Indicates whether or not the error is a detailed validation error message, or if it is a server message.

  • return: True.
boolean isValidationError ()

Redefinition of:
FileMaker_Error::isValidationError()
Indicates whether or not the error is a detailed validation error message, or if it is a server message.
numErrors (line 65)

Return the number of validation rules that failed.

  • return: Number of failures.
integer numErrors ()

Inherited Methods

Inherited From FileMaker_Error

FileMaker_Error::FileMaker_Error()
FileMaker_Error::getErrorString()
FileMaker_Error::getMessage()
FileMaker_Error::isValidationError()

Documentation generated on Thu, 06 Jul 2006 15:52:34 -0700 by phpDocumentor 1.2.3