2

I have a content type form with some fields attached. I'm looking for an easy way of skipping core validation for one of those fields. I guess what I'm looking for is something like this:

$form['foo']['#check_valid'] = FALSE;

This could possibly be achieved using #limit_validation_errors, but this would require some work. Can this be achieved without too much of a hassle?

1

It should be possible to remove core validation from the field by adding the #form_validate array element to the form element you want to edit, then pass a custom validation callback that passes the field by default. That should work.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.