If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans/Eclipse/IDEA NetBeans 8.2 Desktop OS Windows 10 Pro Simulator Latest Device PC, Android, IOS
I am looking at the Validator framework and ask is it possible to add multiple constraints to a Text Component? TextModeLayout tl = new TextModeLayout(1, 1); String phoneRegex = "((\\(\\d{3}\\))|(\\d{3}-))\\d{3}-\\d{4}"; Form f = new Form("Test Validation", tl); TextComponent phone = new TextComponent().label("Home Phone"); Validator val = new Validator(); val.addConstraint(phone, new NumericConstraint(true)); val.addConstraint(phone, new RegexConstraint(phoneRegex, "Must be valid phone number")); f.add(tl.createConstraint().widthPercentage(50), phone); f.show(); Appears only the val.addConstraint(phone, new RegexConstraint(phoneRegex, "Must be valid phone number")); is registered. Although the Validator complains, I would prefer the Keyboard "Numeric" constrain were honored. Can we register multiple Constraints in Validator class? Thanks in Advance -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/c6591d7f-62f7-4bd4-ba16-d34ab4bf5f50%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.