Editablefields don't use drupal field validation for submitted values in views. For example, validation on min / max value.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

VasilyKraev’s picture

Status: Active » Needs review
FileSize
1.19 KB

Patch.

dags’s picture

Status: Needs review » Fixed

Verified the bug and committed the patch to 7.x-1.x. Thanks VasilyKraev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

_vid’s picture

Thanks for posting this.
We're still using alpha2 and so updated the patch to work with a clean pull of 7.x-1.0-alpha2. The line numbers on the above patch didn't line up.

johnkareoke’s picture

I am experiencing the same issue - and this patch doesn't seem to resolve it, so despite it being closed, I've posted here. I think this is sufficiently similar to this issue not to open a separate issue. If you disagree, I'm happy to create a new issue.

I have a date field (on an order entity). It has a field validation (rule defined by field_validation module) to ensure it is not in the past. It is validated in the normal display mode (where it is displayed as an editable field), but when it is in a view, validation that the date is not in the past does not occur.

Validation works (Order Expiry field):
Validation works

Validation (Date not in past) doesn't take place (Order expiry field):
Validation doesn't take place

I have applied this patch and it doesn't resolve my issue (either current alpha or dev).

Any pointers in debugging this would be much appreciated.

I have incorrectly posted about this issue in the clientside validation module - but on finding this issue and having tried various ways to debug it, I think it is related to editable fields and views.

  • I have changed the date format, and widget and I experience the same issue.
  • Have an integer field that is being validated correctly.
  • Validation does occur on this field if an incorrect format is entered, for example 21/12/201A instead of 21/12/2015, however my custom date field validation defined by the field validation module doesn't execute. If I have other custom field validation rules on the integer field, they validate editable field input in views correctly. Likewise, as described above, if this editable field is used outside of a view, the field validation rule executes.