Neos React UI: NodeType property validation issue

Hi guys,
I’m facing a possible bug in the new Noes React UI.
Basically validation, at least with NotEmptyValidator, is applied only after the first modification of the mandatory property.

Steps to reproduce:

  1. Have a NodeType with a property with:

     properties:
       [PROPERTY_NAME]:
          [...]
          validation:
           'Neos.Neos/Validation/NotEmptyValidator': []
    
  2. Apply values to properties leaving the mandatory property blank -> modifications get applied without warnings or “failed validation” feedback

  3. Fill in mandatory property and Apply

  4. Empty out mandatory property -> the “validation failed” popup is shwon

Imho it looks like a bug cause I would expect the validation to kick in before the first apply if fails.

A possible work-around is to use defaultValue, but it’s a work-around :wink:

If anyone can confirm this behaviour I’d gladly open an issue on github. I already looked for openones without finding anything (let’s hope I did not miss it).

Thanks,
Nicola

Hey Nicola,

this might really be a bug; though I am not sure whether we should always validate all properties; or rather go the currently implemented route. Could you open please a ticket on https://github.com/neos/neos-ui/issues ?

Both cases for me have usability problems, especially when NodeTypes.yaml is modfied with existing content…

All the best,
Sebastian

And here you are: https://github.com/neos/neos-ui/issues/1651

Thanks,
Nicola

Hi,
I am new to NEOS and not able to find any helping guide about validation.
Added custom node type

‘version’:
type: string
ui:
label: ‘version’
reloadIfChanged: TRUE
inspector:
group: ‘advanced’
validation:
‘Neos.Neos/Validation/NotEmptyValidator’: []

It’s only work only after filling all metadata and trying to edit. no validation seen on first time creation.

If someone help me, that would be great.

Thanks in Advance