Page 1 of 1

Validation - Regular Expression

Posted: Thu Nov 23, 2017 3:31 am
by dire

Hi,

What I'm doing wrong?

  1. General Option->Client Side Validation ->checked
  2. table Customer->Field (mobila phone)->Validation
    a. Validate ->Regular Expression
    b.Arguments clent-side -> /\(?([0-9]{3})\)?[ ]?([0-9]{3})[ ]?([0-9]{3})$/ (xxx xxx xxx or xxxyyyzzz)
    c.some error text in error mesage.

When I put some dummy number nothing happens? No error message? Any idea?


Re: Validation - Regular Expression

Posted: Thu Nov 23, 2017 10:37 am
by Webmaster

Use double quotes instead of slashes. Try: "^...$" (Replace "..." with your own pattern.)


Re: Validation - Regular Expression

Posted: Thu Nov 23, 2017 12:32 pm
by dire

No luck with "..." or '....'

When error msg fires? before update/insert or after update/insert?


Re: Validation - Regular Expression

Posted: Fri Nov 24, 2017 11:10 am
by motfs

dire wrote:
When error msg fires? before update/insert or after update/insert?

This is client side. The form will validate first before submitting.

When I put some dummy number nothing happens? No error message? Any idea?

If you enter "ABC" for the field, the form will not submit and an error message will return. Provide what you actually input to test and any error message.


Re: Validation - Regular Expression

Posted: Fri Nov 24, 2017 4:50 pm
by dire

Ok It works ...

/\(?([0-9]{3})\)?[ ]?([0-9]{3})[ ]?([0-9]{3})$/ <- is the regular expresion

When I submit ABC or other dumy stuff, error msg fires.