ZenValidatorConstraint::removeParsley PHP Méthode

removeParsley() public méthode

Removes the html attributes required for frontend validation Subclasses should call parent::removeParsley
public removeParsley ( ) : void
Résultat void
    public function removeParsley()
    {
        $this->parsleyApplied = false;
        if ($this->field && $this->customMessage) {
            $this->field->setAttribute(sprintf('data-parsley-%s-message', $this->getConstraintName()), '');
        }
        if (get_class($this->field) === 'CheckboxSetField') {
            $this->field->setAttribute('data-parsley-multiple', '');
        }
    }

Usage Example

 public function removeParsley()
 {
     parent::removeParsley();
     $this->field->setAttribute('data-parsley-dateiso', '');
 }