fix update appointment validation on submit
This commit is contained in:
parent
f7dace8115
commit
6b6697789e
1 changed files with 4 additions and 4 deletions
|
|
@ -465,7 +465,9 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||||
children: [
|
children: [
|
||||||
MihButton(
|
MihButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (_formKey.currentState!.validate()) {
|
||||||
updateAppointmentCall(index);
|
updateAppointmentCall(index);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
buttonColor: MzanziInnovationHub.of(context)!
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
|
|
@ -495,9 +497,7 @@ class _BuildAppointmentListState extends State<BuildAppointmentList> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAppointmentInputValid() {
|
bool isAppointmentInputValid() {
|
||||||
if (widget.titleController.text.isEmpty ||
|
if (widget.dateController.text.isEmpty ||
|
||||||
widget.descriptionIDController.text.isEmpty ||
|
|
||||||
widget.dateController.text.isEmpty ||
|
|
||||||
widget.timeController.text.isEmpty) {
|
widget.timeController.text.isEmpty) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue