Jump to content

Custom client field validation string...


Chris74

Recommended Posts

Hi can someone possibly let me know what I need to do here...

 

1. I created a standard text custom client field that is not a required field and I use the following validation string, which was specified by the instructions in a module I installed...

 

/([0-9])+/

 

2. A customer fills out the registration form, but leaves the field empty.

 

3. WHMCS produces the error on that field that the "value is not valid".

 

If the customer enters a set of numbers into the field, it submits correctly.

 

This field is used by a module I installed and the instructions specify that the above validation string must be used. I don't really understand regular expressions. Is it simply that the expression does not allow for an empty string - so it produces an error because no number is provided?

 

It's reasonable to assume that a customer may not want to fill out that field - so the validation needs to allow for it to be empty.

 

Any idea how I can fix it? Your help would be greatly appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated