Jyxo\Input\Chain\Conditional::isValid PHP Method

isValid() public method

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
return boolean
    public function isValid($value) : bool
    {
        // Validation is performed only if the condition is fulfilled
        if (true === $this->checkCondition($value)) {
            return parent::isValid($value);
        }
        // No validation -> the value is valid
        $this->value = $value;
        return true;
    }