function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aditya JamwalAditya Jamwal 

How to write Validation rule Number field in visual workflow.

Hi Guys,

 

I am trying to write a validation rule for number field in Visual workflow want to check entered number validated for (13,2) pattern. No number more than 13 digits before decimal Or more than 2 digits after decimal should not be accepted.

 

As there are limitations  for writing validation rule in flow.

 

All Inputs are appreciated.

 

 

Thanks
Aditya Jamwal
IBM

RobbiePRobbieP

If you are validating a text input you should be able to use the REGEX expression for this.

 

I use REGEX( {!X2} , "[0-9]{7}-[0-9]{2}") to validate invoice #s. You'll need to replace {!X2} with the field that you want to validate, and modify everything between the quotes to match what you need. If you dont know regex syntax, you will need to google it to figure out how to write it specifically for what you want it to accomplish.

 

I have not used validation in a # or currency input field.

Aditya JamwalAditya Jamwal

Thanks Robbie

 

I have to write validation rule on Number field.I tried to do validation by REGEX,but it giving me error message invalid input parameter for REGEX.

So,I had used REGEX(TEXT({!LoanAmount}),"[0-9]{13}\\.[0-9]{2}").This is not working.

 

I have one alternative to write plugin to do validation for me.But It also required to write test class for the same.
So , I am avoiding plugin.

 

 

RajaramRajaram

Pleae work with support and log a case. Seems like a bug.

Aditya JamwalAditya Jamwal

Thanks Rajaram