Saving allowed even when input is not valid in autocomplete results

Created on 27 July 2012, over 12 years ago
Updated 14 April 2023, over 1 year ago

l create a content type which has a field of entity_reference, called field_user, the widgets type is autocomplete, target type is user,and I create a views display attached, and set it as required.

when I input existed user's keyword, field_user can search out user and node save is OK.

But when input user's keyword which no user has such keyword, the views behind entity_reference attached have no result return,this is fine,but the wrong keyword which I input in autocomplete widgtes text is still there. as field_user is not empty(staticsfied with required) so when I submit the node it' created suceefully even didn't check the field_user is valid or not.

after the node saved, I found that there is no field_user value show,it's still empty.

why entity_reference didn't clean up input of autocomplete when there is no result return and raise an error when submited?

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇳China cn_gd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024