diff options
author | Denis Anisimov <denis@vaadin.com> | 2016-08-09 16:47:56 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-08-11 12:04:10 +0000 |
commit | 81b849c1af199be481e00c86ca324cfaffe8a7a0 (patch) | |
tree | c6387ced1dc828134c7766e1bdbc859ed9ba0668 /uitest | |
parent | 5c515c1680d053d9087c2dc7783a6b8ec181f9b8 (diff) | |
download | vaadin-framework-81b849c1af199be481e00c86ca324cfaffe8a7a0.tar.gz vaadin-framework-81b849c1af199be481e00c86ca324cfaffe8a7a0.zip |
Convert old validators (#87).
Change-Id: I6e4a56855f78595975b645a08390fb56e0e52ef9
Diffstat (limited to 'uitest')
15 files changed, 107 insertions, 94 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java index b1d0891eb6..9f2f066ab0 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/AbstractFieldCommitWithInvalidValues.java @@ -27,7 +27,8 @@ public class AbstractFieldCommitWithInvalidValues extends TestBase { protected void setup() { tf = new TextField("A field, must contain 1-2 chars", new ObjectProperty<String>("a")); - tf.addValidator(new LegacyStringLengthValidator("Invalid length", 1, 2, false)); + tf.addValidator( + new LegacyStringLengthValidator("Invalid length", 1, 2, false)); tf.setBuffered(true); tf.setRequired(true); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java index 3f6498dc07..0e8ccd937f 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldRangeValidation.java @@ -86,34 +86,34 @@ public class DateFieldRangeValidation extends TestBase { actualDateField = createDateField(); actualDateField.setValue(new Date(2011 - 1900, 12 - 1, 1)); - actualDateField.addValidator(new LegacyRangeValidator<Date>("", Date.class, - null, null) { - @Override - public boolean isMinValueIncluded() { - return range.isFromInclusive(); - } - - @Override - public boolean isMaxValueIncluded() { - return range.isToInclusive(); - } - - @Override - public Date getMaxValue() { - return range.getTo(); - } - - @Override - public Date getMinValue() { - return range.getFrom(); - } - - @Override - public String getErrorMessage() { - return "Date must be in range " + getMinValue() + " - " - + getMaxValue(); - } - }); + actualDateField.addValidator( + new LegacyRangeValidator<Date>("", Date.class, null, null) { + @Override + public boolean isMinValueIncluded() { + return range.isFromInclusive(); + } + + @Override + public boolean isMaxValueIncluded() { + return range.isToInclusive(); + } + + @Override + public Date getMaxValue() { + return range.getTo(); + } + + @Override + public Date getMinValue() { + return range.getFrom(); + } + + @Override + public String getErrorMessage() { + return "Date must be in range " + getMinValue() + " - " + + getMaxValue(); + } + }); addComponent(fromField); addComponent(fromInclusive); addComponent(toField); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java index 03ee47d1eb..144e6fa945 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DefaultHandleUnparsableDateField.java @@ -25,10 +25,11 @@ public class DefaultHandleUnparsableDateField extends TestBase { } }); - final DateField validated = new DateField("Validated Default DateField"); + final DateField validated = new DateField( + "Validated Default DateField"); validated.setImmediate(true); - validated.addValidator(new LegacyNullValidator("Validator: Date is NULL", - false)); + validated.addValidator( + new LegacyNullValidator("Validator: Date is NULL", false)); addComponent(validated); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java b/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java index b9a86a4c82..ae6ed721c1 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java +++ b/uitest/src/main/java/com/vaadin/tests/components/form/FormCommitWithInvalidValues.java @@ -28,7 +28,8 @@ public class FormCommitWithInvalidValues extends TestBase { form = new Form(); form.setFooter(null); TextField tf = new TextField("A field, must contain 1-2 chars"); - tf.addValidator(new LegacyStringLengthValidator("Invalid length", 1, 2, false)); + tf.addValidator( + new LegacyStringLengthValidator("Invalid length", 1, 2, false)); tf.setRequired(true); form.addField("a", tf); diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java index d4ead34506..016b0a2d95 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java @@ -96,11 +96,10 @@ public class GridThemeUI extends AbstractTestUIWithLog { getColumn("lastName").setEditable(false); setSizeFull(); getColumn("age").getEditorField().addValidator( - new LegacyIntegerRangeValidator("Must be between 0 and 100", 0, - 100)); - getColumn("birthDate").setRenderer( - new DateRenderer(DateFormat.getDateInstance( - DateFormat.MEDIUM, Locale.US))); + new LegacyIntegerRangeValidator("Must be between 0 and 100", + 0, 100)); + getColumn("birthDate").setRenderer(new DateRenderer( + DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); } } @@ -137,11 +136,10 @@ public class GridThemeUI extends AbstractTestUIWithLog { setEditorEnabled(true); setSizeFull(); getColumn("age").getEditorField().addValidator( - new LegacyIntegerRangeValidator("Must be between 0 and 100", 0, - 100)); - getColumn("birthDate").setRenderer( - new DateRenderer(DateFormat.getDateInstance( - DateFormat.MEDIUM, Locale.US))); + new LegacyIntegerRangeValidator("Must be between 0 and 100", + 0, 100)); + getColumn("birthDate").setRenderer(new DateRenderer( + DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); addFooterRowAt(0); } diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java index 04206b7f07..8182f638b0 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java @@ -199,7 +199,8 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog { protected BeanFieldGroup<ComplexPerson> fieldGroup = new BeanFieldGroup<ComplexPerson>( ComplexPerson.class) { @Override - protected void configureField(com.vaadin.legacy.ui.LegacyField<?> field) { + protected void configureField( + com.vaadin.legacy.ui.LegacyField<?> field) { super.configureField(field); if (field.getCaption().equals("Postal code")) { // Last name editing is disabled through property. @@ -264,8 +265,8 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog { public AutoGeneratedForm(Class<? extends LegacyField> class1) { for (String p : columns) { - LegacyField f = fieldGroup.getFieldFactory().createField( - container.getType(p), class1); + LegacyField f = fieldGroup.getFieldFactory() + .createField(container.getType(p), class1); f.setCaption(SharedUtil.propertyIdToHumanFriendly(p)); fieldGroup.bind(f, p); addComponent(f); diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java index c872269bbd..aa3b32a1b7 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java @@ -44,21 +44,18 @@ public class BasicCrudGridEditorRow extends AbstractBasicCrud { grid.addSelectionListener(new SelectionListener() { @Override public void select(SelectionEvent event) { - Item item = grid.getContainerDataSource().getItem( - grid.getSelectedRow()); + Item item = grid.getContainerDataSource() + .getItem(grid.getSelectedRow()); form.edit((BeanItem<ComplexPerson>) item); } }); grid.setEditorEnabled(true); grid.setSizeFull(); - grid.getColumn("age") - .getEditorField() - .addValidator( - new LegacyIntegerRangeValidator("Must be between 0 and 100", - 0, 100)); - grid.getColumn("birthDate").setRenderer( - new DateRenderer(DateFormat.getDateInstance(DateFormat.MEDIUM, - Locale.US))); + grid.getColumn("age").getEditorField().addValidator( + new LegacyIntegerRangeValidator("Must be between 0 and 100", 0, + 100)); + grid.getColumn("birthDate").setRenderer(new DateRenderer( + DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); addComponent(grid); getLayout().setExpandRatio(grid, 1); } diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java index 74305cdaa3..97e7e53165 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/MultipleValidationErrors.java @@ -1,5 +1,7 @@ package com.vaadin.tests.fieldgroup; +import org.apache.commons.lang.StringEscapeUtils; + import com.vaadin.data.fieldgroup.FieldGroup; import com.vaadin.data.util.BeanItem; import com.vaadin.legacy.data.Validator; @@ -10,7 +12,6 @@ import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.ui.Button; import com.vaadin.ui.Label; import com.vaadin.ui.TextField; -import org.apache.commons.lang.StringEscapeUtils; public class MultipleValidationErrors extends AbstractTestUI { @@ -39,8 +40,8 @@ public class MultipleValidationErrors extends AbstractTestUI { try { fieldGroup.commit(); } catch (FieldGroup.CommitException e) { - if (e.getCause() != null - && e.getCause() instanceof Validator.InvalidValueException) { + if (e.getCause() != null && e + .getCause() instanceof Validator.InvalidValueException) { validationErrors.setValue(StringEscapeUtils .unescapeHtml(AbstractErrorMessage .getErrorMessageForException( diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java index 04e799049c..ea784b46fd 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v70/SimpleLoginView.java @@ -14,8 +14,8 @@ import com.vaadin.ui.TextField; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.themes.Reindeer; -public class SimpleLoginView extends CustomComponent implements View, - Button.ClickListener { +public class SimpleLoginView extends CustomComponent + implements View, Button.ClickListener { public static final String NAME = "login"; @@ -33,8 +33,8 @@ public class SimpleLoginView extends CustomComponent implements View, user.setWidth("300px"); user.setRequired(true); user.setInputPrompt("Your username (eg. joe@email.com)"); - user.addValidator(new LegacyEmailValidator( - "Username must be an email address")); + user.addValidator( + new LegacyEmailValidator("Username must be an email address")); user.setInvalidAllowed(false); // Create the password input field @@ -50,7 +50,8 @@ public class SimpleLoginView extends CustomComponent implements View, // Add both to a panel VerticalLayout fields = new VerticalLayout(user, password, loginButton); - fields.setCaption("Please login to access the application. (test@test.com/passw0rd)"); + fields.setCaption( + "Please login to access the application. (test@test.com/passw0rd)"); fields.setSpacing(true); fields.setMargin(new MarginInfo(true, true, true, false)); fields.setSizeUndefined(); @@ -72,8 +73,8 @@ public class SimpleLoginView extends CustomComponent implements View, /* * Validator for validating the passwords */ - private static final class PasswordValidator extends - LegacyAbstractValidator<String> { + private static final class PasswordValidator + extends LegacyAbstractValidator<String> { public PasswordValidator() { super("The password provided is not valid"); diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java index 0128725207..1b019e05fe 100644 --- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java +++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket1878.java @@ -185,7 +185,8 @@ public class Ticket1878 extends LegacyApplication { form = createForm(l1, "200px", "500px"); BeanItem<FormObject> item = new BeanItem<FormObject>(new FormObject()); form.setItemDataSource(item); - for (Iterator<?> i = item.getItemPropertyIds().iterator(); i.hasNext();) { + for (Iterator<?> i = item.getItemPropertyIds().iterator(); i + .hasNext();) { Object property = i.next(); LegacyField<?> f = form.getField(property); @@ -197,7 +198,8 @@ public class Ticket1878 extends LegacyApplication { f.setCaption(null); } - f.addValidator(new LegacyStringLengthValidator("Error", 10, 8, false)); + f.addValidator( + new LegacyStringLengthValidator("Error", 10, 8, false)); } // createLayout(l1, new // ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL), @@ -277,8 +279,9 @@ public class Ticket1878 extends LegacyApplication { } String alignText = align ? "-A" : ""; String cWidth = componentWidth == null ? "" : " - " + componentWidth; - Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x" - + h + cWidth, newLayout); + Panel p = new Panel( + type + "/" + dirText + alignText + " " + w + "x" + h + cWidth, + newLayout); p.setWidth(w); p.setHeight(h); @@ -310,8 +313,8 @@ public class Ticket1878 extends LegacyApplication { newLayout.addComponent(tf); if (align) { - ((AlignmentHandler) newLayout).setComponentAlignment( - tf, Alignment.BOTTOM_RIGHT); + ((AlignmentHandler) newLayout).setComponentAlignment(tf, + Alignment.BOTTOM_RIGHT); } } } diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java index 1f7bc144f4..d1baceb17c 100644 --- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java +++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket20.java @@ -3,8 +3,8 @@ package com.vaadin.tests.tickets; import com.vaadin.data.util.MethodProperty; import com.vaadin.legacy.data.Validator; import com.vaadin.legacy.data.validator.LegacyCompositeValidator; -import com.vaadin.legacy.data.validator.LegacyIntegerValidator; import com.vaadin.legacy.data.validator.LegacyCompositeValidator.CombinationMode; +import com.vaadin.legacy.data.validator.LegacyIntegerValidator; import com.vaadin.server.LegacyApplication; import com.vaadin.ui.Button; import com.vaadin.ui.CheckBox; @@ -41,19 +41,21 @@ public class Ticket20 extends LegacyApplication { @Override public void validate(Object value) throws InvalidValueException { if (!isValid(value)) { - throw new InvalidValueException(value - + " is not a non-negative number"); + throw new InvalidValueException( + value + " is not a non-negative number"); } } }); - LegacyCompositeValidator v2 = new LegacyCompositeValidator(CombinationMode.OR, null); + LegacyCompositeValidator v2 = new LegacyCompositeValidator( + CombinationMode.OR, null); v2.addValidator(v); v2.addValidator(new Validator() { @Override public void validate(Object value) throws InvalidValueException { if (!"".equals("" + value)) { - throw new InvalidValueException("Value is not empty string"); + throw new InvalidValueException( + "Value is not empty string"); } } }); @@ -69,8 +71,8 @@ public class Ticket20 extends LegacyApplication { mainWin.addComponent(b); } - mainWin.addComponent(new Button("Validate integer", - new Button.ClickListener() { + mainWin.addComponent( + new Button("Validate integer", new Button.ClickListener() { @Override public void buttonClick( com.vaadin.ui.Button.ClickEvent event) { diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java index 3ea5d05f9d..833f794fdb 100644 --- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java +++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket736.java @@ -67,8 +67,8 @@ public class Ticket736 extends LegacyApplication { f.getField("zip").addValidator( new LegacyIntegerValidator("'{0}' is not a number")); ((AbstractComponent) f.getField("zip")).setDescription("Jepjep"); - ((AbstractComponent) f.getField("zip")).setIcon(new ThemeResource( - "../runo/icons/16/folder.png")); + ((AbstractComponent) f.getField("zip")) + .setIcon(new ThemeResource("../runo/icons/16/folder.png")); f.getField("state").addValidator(new IsValidState()); f.getField("name").setRequired(true); f.getField("street").setRequired(true); diff --git a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java index c0ab1a39ad..2cb4f815ca 100644 --- a/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java +++ b/uitest/src/main/java/com/vaadin/tests/tickets/Ticket846.java @@ -33,8 +33,8 @@ public class Ticket846 extends LegacyApplication { // tx.setIcon(new ThemeResource("icons/16/folder.png")); - mainWin.addComponent(new Button("Validate integer", - new Button.ClickListener() { + mainWin.addComponent( + new Button("Validate integer", new Button.ClickListener() { @Override public void buttonClick( com.vaadin.ui.Button.ClickEvent event) { diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java index 8e2c006752..a182f8498b 100644 --- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java +++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java @@ -17,10 +17,10 @@ package com.vaadin.tests.validation; import java.util.Set; -import com.vaadin.legacy.ui.LegacyField; import com.vaadin.legacy.data.Validator; import com.vaadin.legacy.data.validator.LegacyStringLengthValidator; import com.vaadin.legacy.ui.LegacyAbstractField; +import com.vaadin.legacy.ui.LegacyField; import com.vaadin.server.UserError; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractTestUI; @@ -49,20 +49,22 @@ public class FieldErrorIndication extends AbstractTestUI { ComboBox comboBox = new ComboBox("ComboBox"); comboBox.addItem("ok"); comboBox.addItem("error"); - comboBox.addValidator(new LegacyStringLengthValidator("fail", 0, 2, false)); + comboBox.addValidator( + new LegacyStringLengthValidator("fail", 0, 2, false)); comboBox.setValue("error"); ListSelect listSelect = new ListSelect("ListSelect"); listSelect.addItem("ok"); listSelect.addItem("error"); - listSelect.addValidator(new LegacyStringLengthValidator("fail", 0, 2, false)); + listSelect.addValidator( + new LegacyStringLengthValidator("fail", 0, 2, false)); listSelect.setValue("error"); NativeSelect nativeSelect = new NativeSelect("NativeSelect"); nativeSelect.addItem("ok"); nativeSelect.addItem("error"); - nativeSelect - .addValidator(new LegacyStringLengthValidator("fail", 0, 2, false)); + nativeSelect.addValidator( + new LegacyStringLengthValidator("fail", 0, 2, false)); nativeSelect.setValue("error"); TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect"); twinColSelect.addItem("ok"); diff --git a/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java b/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java index 20425b3154..663d289cf2 100644 --- a/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java +++ b/uitest/src/main/java/com/vaadin/tests/validation/TestValidators.java @@ -3,12 +3,12 @@ package com.vaadin.tests.validation; import com.vaadin.legacy.data.Validator; import com.vaadin.legacy.data.validator.LegacyAbstractStringValidator; import com.vaadin.legacy.data.validator.LegacyCompositeValidator; +import com.vaadin.legacy.data.validator.LegacyCompositeValidator.CombinationMode; import com.vaadin.legacy.data.validator.LegacyDoubleValidator; import com.vaadin.legacy.data.validator.LegacyEmailValidator; import com.vaadin.legacy.data.validator.LegacyIntegerValidator; import com.vaadin.legacy.data.validator.LegacyRegexpValidator; import com.vaadin.legacy.data.validator.LegacyStringLengthValidator; -import com.vaadin.legacy.data.validator.LegacyCompositeValidator.CombinationMode; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; @@ -37,7 +37,8 @@ public class TestValidators extends TestBase { // simple validators TextField tf = new TextField("A field, must contain 1-2 chars"); - tf.addValidator(new LegacyStringLengthValidator("Invalid length", 1, 2, false)); + tf.addValidator( + new LegacyStringLengthValidator("Invalid length", 1, 2, false)); tf.setRequired(true); tf.setValue("ab"); form.addField("a", tf); @@ -67,7 +68,8 @@ public class TestValidators extends TestBase { // regular expressions - tf = new TextField("A field, must match the regular expression a.*b.*c"); + tf = new TextField( + "A field, must match the regular expression a.*b.*c"); tf.addValidator(new LegacyRegexpValidator("a.*b.*c", "{0} does not match the regular expression")); tf.setValue("aagsabeqgc"); @@ -97,10 +99,12 @@ public class TestValidators extends TestBase { // TODO CompositeValidator tf = new TextField( "A field, must be a floating point number with 4-5 chars"); - LegacyCompositeValidator cv = new LegacyCompositeValidator(CombinationMode.AND, + LegacyCompositeValidator cv = new LegacyCompositeValidator( + CombinationMode.AND, "The field must contain a floating point number with 4-5 characters"); cv.addValidator(new LegacyStringLengthValidator( - "String length of '{0}' should be 4-5 characters", 4, 5, false)); + "String length of '{0}' should be 4-5 characters", 4, 5, + false)); cv.addValidator(new LegacyDoubleValidator( "{0} must be a floating point number")); tf.addValidator(cv); @@ -112,7 +116,8 @@ public class TestValidators extends TestBase { cv = new LegacyCompositeValidator(CombinationMode.OR, "The field must contain a floating point or with 4-5 characters"); cv.addValidator(new LegacyStringLengthValidator( - "String length of '{0}' should be 4-5 characters", 4, 5, false)); + "String length of '{0}' should be 4-5 characters", 4, 5, + false)); cv.addValidator(new LegacyDoubleValidator( "{0} must be a floating point number")); tf.addValidator(cv); |