Core provides validation that required fields are filled in. See _form_validate() in form.inc.

Flexinode duplicates that validation in flexinode_validate(). The duplicate check should be removed.

CommentFileSizeAuthor
#2 59733.patch692 bytessamc

Comments

ahoeben’s picture

I think flexinode is providing its own validation so it can alter the form with a message about the missing field.
This line seems superfluous in the flexinode_validate() function:

  $validation = flexinode_invoke('validate', $field, $node);
samc’s picture

StatusFileSize
new692 bytes

Patch attached. Tested with a few fieldtypes, but not exhaustively.

@ahoeben: The duplication is in the if block following the flexinode_invoke.

The flexinode_invoke is a callback/hook provided so that fieldtypes can implement custom validation.

samc’s picture

Status: Active » Needs review

Did a bunch more testing with lots of fieldtypes and this seems solid.

ahoeben’s picture

You are right. Please disregard my earlier comment.

+1

Bèr Kessels’s picture

Status: Needs review » Fixed

reviewed and committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)