cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add my own contraint class?

csiege
Champ in-the-making
Champ in-the-making
I would like to define my own constraint class similar to NumericRangeConstraint (but allowing an empty value with the current one does not).

How can I connect my custom constraint class?

thanks.

Chris
4 REPLIES 4

csiege
Champ in-the-making
Champ in-the-making
Still might be useful info, but less important since the regex constrainst works quite well! 😉

thanks.

Chris

gavinc
Champ in-the-making
Champ in-the-making
I'm planning on writing a wiki page on implementing custom constraints and the necessary configuration, not sure when it will be though!

dbevacqua
Champ in-the-making
Champ in-the-making

gavinc
Champ in-the-making
Champ in-the-making
You're quite right, this wiki page was written since the previous post, but it only covers defining the server side constraint.

There is still a missing piece of documentation and this is how to create the related JavaScript validation on the client side (if indeed you need it).

As a starting point you need to look at the setupConstraints() methods in the various ComponentGenerator classes in the org.alfresco.web.bean.generator package.