SproutCMS

This is the code documentation for the SproutCMS project

function getFieldErrors()

Return the errors for a given field

Supports nested error arrays; If $field_name is something like member[5][test] then the error
will be read from self::$errors['member']['5']['test']

Usage

NULL|array Form::getFieldErrors ( string $field_name );

Arguments

  1. string $field_name
    Field to return errors for

Return value

  • array
    Error messages, as strings
  • NULL
    if there aren't any error messages