Failure in field validation based on mask definition (regex?)

Post Reply
User avatar
rennecke
Sponsor
Sponsor
Posts: 214
Joined: 14 Jan 2018, 12:55
Name: Eberhard Rennecke
Location: Switzerland Zurich

Failure in field validation based on mask definition (regex?)

Post by rennecke »

I discovered that the field validation is not fully correct.
The definition of a field holding the MAC address uses regex as proposed in the hint to the mask definition: [a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2} - see attachment.
This works well in a regex tester (http://www.regexpal.com).
The validation in the program does not work well. The string "xx-23-dd-ff-12-3e" is validated true in the application (see attachment).
Did I define the mask wrongly or is there a bug?
Thanks for your feedback.
Attachments
Mask-Definition.PNG
Field-Verification.PNG
Field-Verification.PNG (1.96 KiB) Viewed 3186 times
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Failure in field validation based on mask definition (regex?)

Post by support »

I think you should put

Code: Select all

[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2} 
in mask input filed

Mask definitions field just to define your own symbols for mask that can be used in mask input field. See tooltip at the bottom of the definitions input field
User avatar
rennecke
Sponsor
Sponsor
Posts: 214
Joined: 14 Jan 2018, 12:55
Name: Eberhard Rennecke
Location: Switzerland Zurich

Re: Failure in field validation based on mask definition (regex?)

Post by rennecke »

Hello.
Many thanks. I did it wrong. Now it works.
Regards
Post Reply