Does the use of regexp make that field required? I have used regexp
on a field that is not required. If a user wishes to complete the
field I want the regex to operate but not if the user chooses not to
complete that field. During testing, I found that the regexp produced
an inline prompt to complete the field even though it is the only
validation for that field.
The regexp is:
rules[12]='custom10:* Tu móvil o otro teléfono|regexp|^[0-9,+,(), ,]
{1,}(,[0-9]+){0,}$';
Hi Rups, the regular expression are a powerful tool. You can use them to solve problems very difficult. The use of regexp in yav doesn't make that field required. BUT the regexp itself could make the field required!! In fact, try this example:
The US telephone requires the field (the regexp indeed!), the IT telephone doesn't require it.
So you have to check in deep your regular expression so that it makes exactly you want.
My suggest: if you are a newbie in javascript try to find out a regexp with a search engine. In my opinion, regular expression are difficult to understand in deep.
On Thu, Mar 27, 2008 at 8:37 PM, Rups <isingl...@madasafish.com> wrote:
> Hello Federico,
> Does the use of regexp make that field required? I have used regexp > on a field that is not required. If a user wishes to complete the > field I want the regex to operate but not if the user chooses not to > complete that field. During testing, I found that the regexp produced > an inline prompt to complete the field even though it is the only > validation for that field.
> The regexp is: > rules[12]='custom10:* Tu móvil o otro teléfono|regexp|^[0-9,+,(), ,] > {1,}(,[0-9]+){0,}$';
> Hi Rups, > the regular expression are a powerful tool. You can use them to solve > problems very difficult. > The use of regexp in yav doesn't make that field required. BUT the > regexp itself could make the field required!! > In fact, try this example:
> The US telephone requires the field (the regexp indeed!), the IT > telephone doesn't require it.
> So you have to check in deep your regular expression so that it makes > exactly you want.
> My suggest: if you are a newbie in javascript try to find out a regexp > with a search engine. > In my opinion, regular expression are difficult to understand in deep.
> Best regards, > Federico
> On Thu, Mar 27, 2008 at 8:37 PM, Rups <isingl...@madasafish.com> > wrote:
>> Hello Federico,
>> Does the use of regexp make that field required? I have used regexp >> on a field that is not required. If a user wishes to complete the >> field I want the regex to operate but not if the user chooses not to >> complete that field. During testing, I found that the regexp >> produced >> an inline prompt to complete the field even though it is the only >> validation for that field.
>> The regexp is: >> rules[12]='custom10:* Tu móvil o otro teléfono|regexp|^[0-9,+,(), ,] >> {1,}(,[0-9]+){0,}$';