File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
bundle/Resources/public/admin/js/fieldType Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11( function ( global , doc , ibexa ) {
2- const SELECTOR_FIELD = '.ibexa-field-edit--eztags.ibexa-field-edit--required ' ;
2+ const SELECTOR_FIELD = '.ibexa-field-edit--eztags' ;
33
44 class TagsValidator extends ibexa . BaseFieldValidator {
5- validateTags ( event ) {
5+ validateTags ( event ) {
6+ const fieldContainer = event . currentTarget . closest ( SELECTOR_FIELD ) ;
7+ const isRequired = fieldContainer && fieldContainer . classList . contains ( 'ibexa-field-edit--required' ) ;
68 const isEmpty = ! event . target . value ;
7- const isError = isEmpty ;
9+ const isError = isRequired && isEmpty ;
810 const label = event . target . closest ( SELECTOR_FIELD ) . querySelector ( '.ibexa-field-edit__label' ) . innerHTML ;
911 const result = { isError} ;
1012 if ( isEmpty ) {
You can’t perform that action at this time.
0 commit comments