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