How would you make a custom validation like...

How would you make a custom validation like...

  

An input box that I'd like to respect the format   Letter Number Letter Space Number Letter Number.

Example: G2D 4K5


Thank you very much

hi Francois Leclerc,

You can use Regex action under Text(you find it under reference), through which you can regular expression and define the custom validation. I have attached the screen shot for reference.

Thanks,

Manish Jawla

Hi Manish,

I think Regex_Search will not work in this case because this function needs pattern and here we will need to give static pattern.

Can you think of dynamic pattern i.e. this function must return true only if there is L N L Space N L N?

Thanks and Regards,

Suraj Borade

Hi Francois Leclerc/Suraj,

I have attached the sample oml in which i have used the regex and its working completely fine dynamically.

@SURAJ: I think you should learn more about regex.

Thanks,

Manish Jawla

Hi,

Please use the below regex for validation:

"^[A-Z]{1}[0-9]{1}[A-Z]{1} [0-9]{1}[A-Z]{1}[0-9]{1}$"

Thanks,

Manish Jawla