@Test public void defaultValidationIsNoop() { final FormFieldController sampleFieldController = new FormFieldController() { @Override public void initialize() { } @Override public String getFieldName() { return "Sample"; } @Override public Object getFieldValue() { return null; } @Override public void onValid() { throw new RuntimeException("Should not be called by default!"); } @Override public void onInvalid(String reason) { throw new RuntimeException("Should not be called by default!"); } }; assertThat(sampleFieldController.validate(null)).isTrue(); }
public boolean validate(F fieldValue) { return true; }
FormFieldController implements FxmlController { public boolean validate(F fieldValue) { return true; } }
FormFieldController implements FxmlController { public boolean validate(F fieldValue) { return true; }  }
FormFieldController implements FxmlController { public boolean validate(F fieldValue) { return true; }  abstract String getFieldName(); abstract F getFieldValue(); boolean validate(F fieldValue); boolean isValid(); void onValid(); void onInvalid(String reason); }
FormFieldController implements FxmlController { public boolean validate(F fieldValue) { return true; }  abstract String getFieldName(); abstract F getFieldValue(); boolean validate(F fieldValue); boolean isValid(); void onValid(); void onInvalid(String reason);  }