- Posts: 9
- Thank you received: 0
Questions about Payment Form extension
Validation Rules (Checkbox)
- Francis Comtois
- Topic Author
- Offline
- New Member
Less
More
7 years 9 months ago #83500
by Francis Comtois
Validation Rules (Checkbox) was created by Francis Comtois
Dear All,
I have set up a custom field (checkbox) with 6 different values listed with (i) fee field enabled, and (ii) 6 corresponding fees. I am trying to limit the maximum number of selectable items to 2. Accordingly, I have set the validation rule as validate[required,maxSize[2]].
However, each time I check two items on the checkbox on my form, I get an error in a red box stating *Maximum2characters allowed.
In the circumstances, I would be grateful if I could explained how to fix the situation so I do not get an error message once two items are selected and also, if possible, I would like to know how to amend the error message when more than 2 items are selected.
Thank you in advance for your help!
I have set up a custom field (checkbox) with 6 different values listed with (i) fee field enabled, and (ii) 6 corresponding fees. I am trying to limit the maximum number of selectable items to 2. Accordingly, I have set the validation rule as validate[required,maxSize[2]].
However, each time I check two items on the checkbox on my form, I get an error in a red box stating *Maximum2characters allowed.
In the circumstances, I would be grateful if I could explained how to fix the situation so I do not get an error message once two items are selected and also, if possible, I would like to know how to amend the error message when more than 2 items are selected.
Thank you in advance for your help!
Please Log in or Create an account to join the conversation.
- Calum
- Offline
- Elite Member
Less
More
- Posts: 257
- Thank you received: 34
7 years 9 months ago #83501
by Calum
Replied by Calum on topic Validation Rules (Checkbox)
Does setting max3 produce the validation rule effect you want - i.e. can select 1 or 2 check boxes but not 3? The message will probably still not make sense though?
If so its because it effectively is recording 1,2 as the response which is 3 characters. I'm sure someoen will be along to comment if the message can be customised?
If so its because it effectively is recording 1,2 as the response which is 3 characters. I'm sure someoen will be along to comment if the message can be customised?
Please Log in or Create an account to join the conversation.
- Francis Comtois
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 9 months ago #83503
by Francis Comtois
Replied by Francis Comtois on topic Validation Rules (Checkbox)
It still gives an error message (now *Maximum3characters allowed).
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.