Skip to Content Skip to Menu

[SOLVED] CB Field Groups with regexp validation bug

  • Bestuur
  • Bestuur
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
4 years 6 months ago - 4 years 6 months ago #318417 by Bestuur
If i use 'custom regex' as 'Validation Rule' then the save button does not work anymore

simple regex that i use was: {[1-8]}
Other validations like phone number seems to work.
Last edit: 4 years 6 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318448 by krileon
Replied by krileon on topic CB Field Groups with regexp validation bug
That's not a valid REGEXP. You need to provide the delimiter as well. Example as follows.

FROM: {[1-8]}
TO: /{[1-8]}/


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.

  • Bestuur
  • Bestuur
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
4 years 6 months ago - 4 years 6 months ago #318457 by Bestuur
Replied by Bestuur on topic CB Field Groups with regexp validation bug
Jeps ... user error indeed. :whistle:

online you don`t see the delimiter often.

Also found out that my regex check for each char instead of the whole line:
So my final code for the range of 1 to 8 is :/^([1-8])$/

for other regex noobs like me:
gamon.webfactional.com/regexnumericrangegenerator/
don`t forget to check 'Match Whole Line' else 10 is also accepted
Last edit: 4 years 6 months ago by Bestuur.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318465 by krileon
Replied by krileon on topic CB Field Groups with regexp validation bug
If you just want to accept a number with a range of 1 to 8 why not use an integer field with minimum and maximum value parameters configured?


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.

  • Bestuur
  • Bestuur
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
4 years 6 months ago #318469 by Bestuur
Replied by Bestuur on topic CB Field Groups with regexp validation bug
That was as an example my actual regex looks likes this:

/^([468]|[1-2][02468]|[3][024]|[4-6][02468]|[7][0]|[7][68]|[8-9][02468]|10[0246]|11[246]|1[2-3][02468]|14[02]|148|1[5-7][02468])$/

Only even numbers and some numbers not.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318493 by krileon
Replied by krileon on topic CB Field Groups with regexp validation bug
Ah, ok that makes more sense as to why you're using a text field then. Thank you for clarification. :)


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.

Moderators: beatnantkrileon
Powered by Kunena Forum