I am trying to add a simple validation to the created page.
I am trying to match a string entered to text box with a corresponding mask.
I have created a new validation that checks for “Item / Column in expression 1 equals string literal in expression 2”
In expression 1 I have a name of my text box: P2_T_1
In expression 2 I have a mask I am trying match to: ^(\d.\d.\d_$)
Therefore example string of: 4.4.4_anything should match and be validated, yet no matter what I put into the text field validation fails.
Is that just a simple mistake or am I completely misunderstanding the way validation in APEX is performed? I am fairly new to APEX, hence this simple question.
Any help with solving this ‘mystery’ will be much appreciated
That validation won’t handle regexp. It quite literally means= value in item matches expression 2. You can see this for yourself: enter ^(\d.\d.\d_$) as a value into your textbox.
You need the regexp validation. In apex 4.1 you can choose this, i don’t know for previous versions. With that, it works, and entering “4.4.4_” is a successfull validation with it.