Validate text field on document creation

I have a custom document and I want to validate one of the fields, which is a text field, before document creation. Validation means parsing it against a regular expression. Is there any way to do this in Nuxeo?

0 votes

1 answers



Each field is implemented as a JSF component. You can use validation system.

Easy way with Nuxeo Studio/IDE, here is the documentation:

But if you want to do it yourself, because you feel as an JSF expert :

0 votes

Hi have created a validator but nuxeo can't find it.

I got this error message: validator="#{MyValidator.validate}": Target Unreachable, identifier 'MyValidator' resolved to null

In nuxeo studio, for the widget I want I have the validator set to #{MyValidator.validate} I have added this to the deployment-fragment: <extension target="faces-config#VALIDATOR">



The class exists, is public and implements implements javax.faces.validator.Validator.

Can you help me with this?


I just solved it. Is the code I have above but the validator field must be set to MyValidator.

I recommend to use Seam component instead a pure JSF validator, for refactoring and managing, all will be easier.