cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with REGEX constrain in Alfresco Share

mitpatoliya
Star Collaborator
Star Collaborator

I having REGEX constrain on one of the property with datatype as integer.

There is one issue seems like bug.

If value is being successfully validated from user interface on server side it fails and If I add non-matching value it gives error on client side it self so this looks like some bug.

Error which I got when I add proper value.


    <constraint name="test:fractionConstrain" type="REGEX">
        <parameter name="expression"><value>.*[^0-9].*</value></parameter>
        <parameter name="requiresMatch"><value>false</value></parameter>
     </constraint>


org.alfresco.repo.node.integrity.IntegrityException: 04270037 Found 1 integrity violations:
Invalid property value:
   Node: workspace://SpacesStore/e9ddba34-64bc-4626-b4f0-2d599d71de56
   Type: {com.asm.recipe.model}nutritions
   Property: {com.asm.recipe.model}servingSize
   Constraint: 04270036 Value '5' matches regular expression: .*[^0-9].*
   at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:661)
11 REPLIES 11

ipirat
Champ in-the-making
Champ in-the-making
could you please post your model (using &lt;code&gtSmiley Wink and the exact error message from the log?

mitpatoliya
Star Collaborator
Star Collaborator
Ohhh, This is crazy finally I was able to solve it I think. So, dumb error property data type was double and it was causing that issue.