Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)

[#4414] Server side validation

10 years 10 months ago - 10 years 10 months ago #240310 by iytworldwide
[#4414] Server side validation was created by iytworldwide
Hi Kyle,

I need to write up a server side validation so as to avoid non-english characters during registration. We deal with education and certifications and issue certificates in english.

I do not want this validation in client side as I have to re-perform this on server side too. Can I do this without modifying core CB files and just using CB autoactions? i.e Before registration, add a php validation to check the $_POST for any non-english character and then raise error message to user, just the way CB display serverside validations such as email already registered, captcha invalid.
I have seen CB code where CB making call to before,after triggers and does some status check but I am not sure whether from auto actions it is possible to pass validation errors back to framework so that it can stop processing and display validation message to user. If possible then how and in what structure I need to pass validation error back to framework.

Thanks,
Amit Dangwal
Last edit: 10 years 10 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
10 years 10 months ago #240326 by krileon
Replied by krileon on topic Server side validation
You can probably just add custom regex valiation to your field by editing your field within CB > Field Management. CB Auto Actions is not really suited for validation. It's designed to not interfere with normal processes so I doubt you'll be able to stop registration.


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: iytworldwide

Please Log in or Create an account to join the conversation.

10 years 10 months ago #240457 by iytworldwide
Replied by iytworldwide on topic Server side validation
Thanks Kyle. Custom regex field validation is all I need here as it is working as server side validation.

Thanks,
Amit Dangwal

Please Log in or Create an account to join the conversation.

10 years 10 months ago #240504 by iytworldwide
Replied by iytworldwide on topic Server side validation
Hi Kyle,

I see a difference when validations happens for some field. There are few fields which support even client side validation + server side validation where as firstname, middlename and lastname only supports server side validation for regex. Why firstname,lastname only server side. Point is on few fields, as soon as user enters text, validation message displayed in case it is incorrect. So for some field user will see message after submitting request. Since framework allows serverside and client side validation for regex so I am picking it both.

Thanks,
Amit

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
10 years 10 months ago #240548 by krileon
Replied by krileon on topic Server side validation
Name and Username are stored to Joomla so Joomlas validation needs have priority over CBs for those fields. It does do client side validation, but only to ensure characters against Joomlas validation aren't included. The custom validation you can supply to the field happens server side for these fields. I can probably get this implemented and working for CB 2.0 though as it just needs another or case to the jQuery validation.


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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
10 years 10 months ago #240549 by krileon
Replied by krileon on topic Server side validation
Ok, implemented this for CB 2.0.

forge.joomlapolis.com/issues/4414

Username and Name fields will support client side validation in CB 2.0.


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: iytworldwide

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum