Regex validation in dmn rules for account num validation

Hi @Team,

I am trying to write a dmn rule to validate account num where only numeric value is allowed. What could be the efficient expression in this case?
I have written like :invalid when
But I feel its like hard coding for special character and symbols, so tried with below:
invalid when ^[0-9] and [^0-9] and other combination as well but all are failing or not supporting.


Hey @jauhari

maybe you can first clarify what you mean by “efficient”? I guess it is about performance (execution time)? Did you experience any issues with the expressions?

What do you mean with failing? Do you see any errors?

After we resolved the above questions I guess @Philipp_Ossler can help here.


invalid when
not(matches(request.beneficiaryAgent.accountNumber, “^[0-9]+$”)),
this work fine for me for the account num validation (only numeric digit allowed).