bug/new-entries-dont-get-validated Validierung von Einträgen #11
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ public class AllPatientController {
|
||||||
|
|
||||||
this.buttonAdd.setDisable(true);
|
this.buttonAdd.setDisable(true);
|
||||||
ChangeListener<String> inputNewPatientListener = (observableValue, oldText, newText) ->
|
ChangeListener<String> inputNewPatientListener = (observableValue, oldText, newText) ->
|
||||||
AllPatientController.this.buttonAdd.setDisable(!AllPatientController.this.areInputDataValid());
|
AllPatientController.this.buttonAdd.setDisable(!AllPatientController.this.isInputDataValid());
|
||||||
this.textFieldSurname.textProperty().addListener(inputNewPatientListener);
|
this.textFieldSurname.textProperty().addListener(inputNewPatientListener);
|
||||||
this.textFieldFirstName.textProperty().addListener(inputNewPatientListener);
|
this.textFieldFirstName.textProperty().addListener(inputNewPatientListener);
|
||||||
this.textFieldDateOfBirth.textProperty().addListener(inputNewPatientListener);
|
this.textFieldDateOfBirth.textProperty().addListener(inputNewPatientListener);
|
||||||
|
@ -274,7 +274,7 @@ public class AllPatientController {
|
||||||
this.textFieldAssets.clear();
|
this.textFieldAssets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean areInputDataValid() {
|
private boolean isInputDataValid() {
|
||||||
if (!this.textFieldDateOfBirth.getText().isBlank()) {
|
if (!this.textFieldDateOfBirth.getText().isBlank()) {
|
||||||
try {
|
try {
|
||||||
DateConverter.convertStringToLocalDate(this.textFieldDateOfBirth.getText());
|
DateConverter.convertStringToLocalDate(this.textFieldDateOfBirth.getText());
|
||||||
|
|
Loading…
Reference in a new issue