Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with own properties on Neos.Neos:Content #31

Open
patriceckhart opened this issue Aug 16, 2018 · 4 comments
Open

Problems with own properties on Neos.Neos:Content #31

patriceckhart opened this issue Aug 16, 2018 · 4 comments

Comments

@patriceckhart
Copy link

Since updating to Neos 4 I get the following error, when I insert an email validator:
Unsupported validation option (s) found: animation, delay, mt, mb, ml, mr.

I use these properties for Neos.Neos:Content. I'm not sure why the validators implement Neos.Neos:Content.

@bwaidelich
Copy link
Member

I checked again and Validators have Neos.Neos:Content as superType so that they appear in the Neos Backend.
The issue occurs in the NodeBasedValidator implementation that translates all node properties to options of the validator..
We should change that so that the options have to be defined in the corresponding *.Definition of the validator

@patriceckhart
Copy link
Author

patriceckhart commented Aug 29, 2018

I have changed to line

[email protected] = ${Array.concat(value, validatorNode.properties)}

in Private/Resources/Fusion/NodeBased/NodeBasedValidator.fusion to
options >

and it works. The validators also.

@erkenes
Copy link

erkenes commented Feb 18, 2020

I have changed to line

[email protected] = ${Array.concat(value, validatorNode.properties)}

in Private/Resources/Fusion/NodeBased/NodeBasedValidator.fusion to
options >

and it works. The validators also.

You can fix it like this too:

'Neos.Form.Builder:AbstractValidator':
  properties:
    # Remove `marginTop` and` marginBottom` as they cause an error and don't work here anyway
    marginTop: FALSE
    marginBottom: FALSE
    ## your other options

@lorenzulrich
Copy link

Just for the record, I suggest additional properties to node types such as Neos.Neos:Node with a mixin instead of just adding properties. This makes it easier to deactivate those here:

'My.Site:Mixin.FooMixin':
  abstract: true
  properties:
    foo:
      type: string

'Neos.Neos:Node':
  superTypes:
    'My.Site:Mixin.FooMixin': true
'Neos.Form.Builder:AbstractValidator':
  superTypes:
    'My.Site:Mixin.FooMixin': false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants