cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UK postcode Rule

Former Member
0 Likes
1,900

Hi All,

I tried to write a a rule for UK postcode validation by using Match Pattern .when I test it giving right answers.

but this match pattern passing just first half postcode (AA9)  also pass.

when I bind it to the postcode column it passing all the patterns except Just Numbers(12345,123456,7896-----fail) in that field.

it gives score 9.99.

Did anyone came across this problem,

please help me out or please can anyone share if they wrote the rule for this already.

Regards

Kumarr

View Entire Topic
former_member655569
Participant
0 Likes

Try this...

BEGIN

IF(

( match_pattern($Name, 'X9 9XX')) OR

( match_pattern($Name, 'X99 9XX')) OR

( match_pattern($Name, 'XX9 9XX')) OR

.............

)

Return True;

Else

Return False;

END

System takes any characters in place of X and any number in place of 9.