SproutCMS

This is the code documentation for the SproutCMS project

function multipleCheck()

Check multiple fields against a validation method

This is similar to Validator::check but it's designed for different validation
methods, which work on a set of fields instead of a single field (e.g. Validity::oneRequired)

Additional arguments are passed to the underlying method
Methods which are on classes within the Sprout\Helpers namespace do not need the namespace
specified on the function name

Usage

bool $Validator->multipleCheck ( array $fields , callable $func );

Arguments

  1. array $fields
    The fields to check
  2. callable $func
    The function or method to call.

Return value

  • bool
    True if validation was successful, false if it failed