• 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

Custom validation 14 years 3 months ago #12349

  • info221
  • info221's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Hello,

I want to have a custom validation code for a postcode.
I need it to check if they filled it in correctly (4 number and two letters, example: 1234XX).

I found something like this but i dont seem to get it to work.
$postcodes = array('8111AA', '8111aa', '0111 AA', '8111 AA', '8111 aa');
foreach($postcodes as $postcode)
{
    if(!preg_match('/^[1-9]{1}[0-9]{3} [A-Z]{2}$/', $postcode))
    {
        echo $postcode . ' = ' . ' incorrect<br />';
    }
    else
    {
        echo $postcode . ' = ' . ' correct<br />';
    }
}

I need some help!

Kind regards,

Louwrens
Last Edit: 14 years 3 months ago by alexp.
The administrator has disabled public write access.

Re:Custom validation 14 years 3 months ago #12369

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 14 years 3 months ago by alexp.
The administrator has disabled public write access.

Re:Custom validation 14 years 3 months ago #12373

  • info221
  • info221's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Thanks for the reply,

Those links you sent me lead to a 404 page.

Regards,

Louwrens
The administrator has disabled public write access.

Re:Custom validation 14 years 3 months ago #12393

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
try again
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.

Re:Custom validation 12 years 8 months ago #18329

  • swon1505
  • swon1505's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
How can we create extra input fields in validation. I need to check with other fields of the form at the same time. Many thanks
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!