• 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: Validation rules

Validation rules 13 years 6 days ago #17271

  • koenmeul
  • koenmeul's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Can anyone tell me the validation code for:

Only numbers except zero? Example:

12 = good
120 = good
234234= good
0 = false

And does anyone know how to get standard **-**-** in a form?
For example:

the customer must fill in his license plate, for example HD-NH-02.
Is it possible to make the letters all capitals and show standard the - - ?

Thanks for the anwers!
The administrator has disabled public write access.

Validation rules 11 years 2 months ago #26801

  • danilofagundes
  • danilofagundes's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Thank you received: 5
Good Morning Friend, this can be done as follows to get the error message when zero:

A similar like the following script is added within "Scripts Called on form Process" area (backend > Components > RSForm!Pro > Manage Forms > your form > Properties > PHP Scripts):
if(intval($_POST['form']['my-textbox-field']) == 0){
	$invalid[]= RSFormProHelper::getComponentId('my-textbox-field');
}
Replace "my-textbox-field" with your textbox field exact name.

For the desired combination of characters, use a query mask.

Regards
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!