CB Query Field validation on a date field?

8 years 1 month ago - 8 years 1 month ago #279252 by edmundcheong
CB Query Field validation on a date field? was created by edmundcheong
I am looking through this tutorial , i was testing out to validate a date fieldtype, somehow i am not able to do so.

Is there a way to validate a date?

Please Log in to join the conversation.

8 years 1 month ago #279286 by krileon
Replied by krileon on topic CB Query Field validation on a date field?
What do you mean validate a date field? Validate it how? CB Query Field validation works on date fields as well, but it's query validation. It's expecting to compare the field value to something else in the database.

The CB Code Field can use raw PHP to validate a fields value though.


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.

Please Log in to join the conversation.

8 years 1 month ago #279301 by edmundcheong
Replied by edmundcheong on topic CB Query Field validation on a date field?
I have used it on a text field and it works, exactly like the video tutorial. Somehow when i change it to a date field type, it doesnt do the ajax validation.

Please Log in to join the conversation.

8 years 1 month ago #279324 by krileon
Replied by krileon on topic CB Query Field validation on a date field?
Looks like the ajax validation doesn't work for multicheckbox, radio, date, and datetime fields due to their input binding for the validation. Have noted this in the below bug ticket.

forge.joomlapolis.com/issues/5846

The PHP side validation will still function fine.


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.

Please Log in to join the conversation.

8 years 1 month ago #279325 by edmundcheong
Replied by edmundcheong on topic CB Query Field validation on a date field?
Somehow, the php side is not working for me too.. could it be of the time settings in joomla which could be causing this to not work?

Please Log in to join the conversation.

8 years 1 month ago #279333 by krileon
Replied by krileon on topic CB Query Field validation on a date field?
The PHP side validation is working fine in my tests. It's likely your validation query doesn't work as expected. Be sure to test directly in phpmyadmin as without ajax validation it makes it a bit more difficulty to see if your query is working as expected. Note the query validation is based off the rows returned. So for example it can validate on a row returned or no rows returned.


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.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn