Check for one of the two values being filled

package Gems
subpackage Validate
copyright Copyright (c) 2012 Erasmus MC
license New BSD License
since Class available since version 1.6

 Methods

Sets validator options

__construct($description, string $fieldName, $fieldDescription) : void

Parameters

$description

$fieldName

string

Field name against which to validate $param string $fieldDescription Description of field name against which to validate

$fieldDescription

Defined by \Zend_Validate_Interface

isValid(mixed $value, $context = array()) : boolean

Returns true if and only if a token has been set and the provided value matches that token.

Parameters

$value

mixed

$context

Returns

boolean

 Properties

 

$_description

$_description 

Default

 

Description of field name against which to validate

$_fieldDescription : string

Default

 

The field name against which to validate

$_fieldName : string

Default

 

$_messageTemplates

$_messageTemplates 

Default

array(self::NEITHER => "Either '%description%' or '%fieldDescription%' must be entered.")
 

$_messageVariables

$_messageVariables : array

Default

array('description' => '_description', 'fieldDescription' => '_fieldDescription')

 Constants

 

Error codes

NEITHER = 'neither' 
const string