public function applyParsley()
{
if (!$this->field) {
user_error("A constrained Field does not exist on the FieldSet, check you have the right field name for your ZenValidatorConstraint.", E_USER_ERROR);
}
$this->parsleyApplied = true;
if ($this->customMessage) {
$this->field->setAttribute(sprintf('data-parsley-%s-message', $this->getConstraintName()), $this->customMessage);
}
// CheckboxSetField might not have a unique name, so set parsley-multiple attribute
if (get_class($this->field) === 'CheckboxSetField') {
$this->field->setAttribute('data-parsley-multiple', $this->field->getName());
}
}