If you return true the validation passed. If you return false the validation failed. Be sure to keep that in mind when supplying your custom validation code.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Hereto I have a little further question for a situation, where I have two scenarios:
I need a double validation for a situation, where 1) [cb_cv_date_until] is empty and the second validation where 2) [cb_cv_date_until] is not empty (because the user could fill something in [cb_cv_date_until] before he added to [cb_cv_date_from]
So I would like to use this lines of code (serial, not nested) in the CB Code Field:
Can I do these different situation with procedure? (The additional field at [cb_cv_date_from] is set to [cb_cv_date_until])
I missed the validation of the second line. That don't work.
If I have once this in place, I can go further alone for all other validations. Here I need a feedback to the general procedure with multiple validations. So I would like to ask you, whether you can give a short hint hereto again.
You can put as many validation rules as you like in your code. Just return true if validation passed or return false if it failed. This is all just standard PHP except with support for inline substitutions. If you need additional field values sent to the validation be sure you select those fields in the "Additional Fields" parameter below "Ajax Validation". My example in my reply below already shows multiple validation rules in a single usage.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.