• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Unique value validation

Unique value validation 14 years 11 months ago #7514

  • gebece
  • gebece's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Dear friends:

I have a field, where people can fill with one unique value (called CNPJ):

This filed must be validated with 3 rules:

1) The field checks whether the number has 14 digits.(no more no less)

2) If this number was submitted another time, it will not submit again, otherwise will submit without problems, so I think the submit button must check before all the submissions and check all the existent CNPJs (name I gave the field)

3) I would like to place mask in the CNPJ like this 90.496.126/0001-91

all numbers ##.###.###/####-##

Any Idea?

I am really lost!
Last Edit: 14 years 11 months ago by gebece.
The administrator has disabled public write access.

Re:Unique value validation 14 years 11 months ago #7525

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

This can be done... however it will require a solid base of php and MySQL knowledge.

There are two ways of achieving this:

1. Create your own custom validation rule by adding a validation function to the components/com_rsform/controller/validation.php - here you will also be able to create a regular expression.

2. You can create a script, placed on the Scripts called on form process area... The script would be similar to the one posted here:

www.rsjoomla.com/customer-support/docume...stration-number.html
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!