• 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 with default value exclusion

validation with default value exclusion 12 years 5 months ago #15669

Hello,

for some fields I use additional attributes like
onblur="if(this.value == '') { this.value='name'}" onfocus="if (this.value == 'name') {this.value=''}"

The default value is „name“. How can I exclude this value from the validation? In other words: If there is the default value, this field should be sign as an error after form send. Thanks for reply.
The administrator has disabled public write access.

Re: validation with default value exclusion 12 years 5 months ago #15676

I find the solution by myself. To exclude the default value, use the "Regex Validation Rule" with the following syntax:
'^(?!name)'

In this case "name" is the default value. To match two words, use "your.name" instead of "name".
The administrator has disabled public write access.
The following user(s) said Thank You: d_l_i

Re: validation with default value exclusion 12 years 22 hours ago #17410

  • PreArt
  • PreArt's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
I'm looking for the same, but I don't know how to use it

'^(?!name)'

Could You please help me, where i should put code?
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!