textinputIntRange.setText("0");
textinputIntRange.setValidator(new IntRangeValidator(0, 100));
// validate using a date regex.
textinputDateRegex.setText("2009-09-01");
textinputDateRegex.setValidator(new RegexTextValidator(
"(19|20)\\d\\d[- /.](0[1-9]|1[012])[-/.](0[1-9]|[12][0-9]|3[01])"));
// creating a custom model that only accepts "true" or "false"
textinputCustomBoolean.setText("true");
textinputCustomBoolean.setValidator(new Validator() {