I used to add validator constraints on TextFields and TextArea but it now throws java.lang.IllegalArgumentException: addConstraint needs an InputComponent as first argument.
Form hi = new Form("Welcome", new TextModeLayout(3, 2));
Validator validator = new Validator();
TextField txt = new TextField();
validator.addConstraint(txt, new LengthConstraint(1, "HI"));
Button btnVal = new Button("VALIDATE");
validator.addSubmitButtons(btnVal);
hi.add(txt);
hi.add(btnVal);
hi.show();
Replacing the Textfield with a TextComponent works. So is that a regression or is that intended and why ?