How to create a program rule for an integer attribute that has a fixed length

Hello,

I’d like to create a program rule for an attribute that is 12 digits long. Please advise how I can do that.

Thank you.

What should do your program rule? What are you trying to achieve?

1 Like

i am trying to limit the length of the digits to a fixed number to only get entries that are valid. The government ID is 12 digits long. So i want the user to only enter Government ID that is 12 digits long

use PR expression:
(d2:hasValue(‘your_ID_variable’) && !d2:validatePattern( #{your_ID_variable}, “^\d{12}$”)) as PR action display text ‘ID must be 12digit long! Please check it!’

this expression will accept only digits and only if 12digit long