public function addValueConstraint($fieldType, $value, $constraint)
    {
        $validatorName = $this->getFieldValidator($fieldType);
        $validatorParent = $validatorName . 'Validator';
        if ($this->fieldConstructionObject['fieldType']->validatorConfiguration == null) {
            $this->fieldConstructionObject['fieldType']->validatorConfiguration = array(
                $validatorParent => array(),
            );
        }
        $value = is_numeric($value) ? $value + 0 : $value;

        $this->fieldConstructionObject['fieldType']
            ->validatorConfiguration[$validatorParent][$constraint . $validatorName] = $value;
    }
public function addValueConstraint($fieldType, $value, $constraint)
    {
        $validatorName = $this->getFieldValidator($fieldType);
        $validatorParent = $validatorName . 'Validator';
        if ($this->fieldConstructionObject['fieldType']->validatorConfiguration == null) {
            $this->fieldConstructionObject['fieldType']->validatorConfiguration = array(
                $validatorParent => array(),
            );
        }
        $value = is_numeric($value) ? $value + 0 : $value;

        $this->fieldConstructionObject['fieldType']
            ->validatorConfiguration[$validatorParent][$constraint . $validatorName] = $value;
    }
public function addValueConstraint ( $ fieldType , $ value , $ constraint ) { $ validatorName = $ this -> getFieldValidator ( $ fieldType ) ; $ validatorParent = $ validatorName . 'Validator' ; if ( $ this -> fieldConstructionObject [ 'fieldType' ] -> validatorConfiguration == null ) { $ this -> fieldConstructionObject [ 'fieldType' ] -> validatorConfiguration = array ( $ validatorParent => array ( ) , ) ; } $ value = is_numeric ( $ value ) ? $ value + 0 : $ value ; $ this -> fieldConstructionObject [ 'fieldType' ] -> validatorConfiguration [ $ validatorParent ] [ $ constraint . $ validatorName ] = $ value ; }
Adds a validator to the stored field.

@param string $fieldType Type of the field
@param string $value Value of the constraint
@param string $constraint Constraint name
Adds a validator to the stored field .