Validation Microflow

0
I have an attribute ISBN and It should be containing alpha numeric and 8 character starting  with ISBN. How can I restrict with validation.
asked
4 answers
1

You can put the following in a decisiton:

isMatch($YourObject/ISBN, '^ISBN[A-Za-z0-9]{4}$')

answered
1

Use a regex for it. See stackoverflow: https://stackoverflow.com/questions/41271613/use-regex-to-verify-an-isbn-number

And see the documentation here for how to use a regex: https://docs.mendix.com/refguide/regular-expressions/

Regards,

Ronald

 

answered
1

You can try input mask feature for input fields which will easily take care of prefix, length and type.

For instance, for your requirement use this: ISBN******* 

*: for alpha numeric

 

You can also try marketplace control like IMask - Masked Input. 

answered
0

You can validate this using a Decision with isMatch.

Condition:


isMatches($Object/ISBN, '^ISBN[A-Za-z0-9]{4}$')

Explanation (simple):

  • Must start with ISBN
  • Last 4 characters alphanumeric

If the condition is false, show a validation message.

answered