• 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: Custom Validation - NO MARKUP ALLOWED!!!

Custom Validation - NO MARKUP ALLOWED!!! 13 years 3 months ago #16179

  • learnthrusong
  • learnthrusong's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Thank you received: 3
I just wanted to share another custom validation rule that I use on publicly available forms to PREVENT the user from entering any markup...
function noMarkup($nocode) 
        { 
	        if ($nocode == '') return true;
	        if (eregi('^[^<>`~!/@\#}$%:;)(_^{&*=|+]+$', $nocode))
	        return true;
	        else
	        return false;
        }

FYI: This was created using the example function given by the RS guys and some trial and error using the RegExpLib website.

Hope it's useful!

Gez
Last Edit: 13 years 3 months ago by learnthrusong. Reason: Added links
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!