date error issue address validation applied to date filter previously different error value applied to date filter

ipd-changes-for-vida-plus
parent c3e4ef142d
commit 2c8c37238e

@ -50,6 +50,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
String? durationError; String? durationError;
String? unitError; String? unitError;
String? strengthError; String? strengthError;
String? dateError;
String? icdCodeError; String? icdCodeError;
int? selectedType; int? selectedType;
@ -399,7 +400,7 @@ getIcdCodeData() async{
child: InkWell( child: InkWell(
onTap: () => selectDate(context, widget.prescriptionViewModel), onTap: () => selectDate(context, widget.prescriptionViewModel),
child: AppTextFieldCustom( child: AppTextFieldCustom(
validationError: strengthError, validationError: dateError,
hintText: TranslationBase.of(context).date, hintText: TranslationBase.of(context).date,
isTextFieldHasSuffix: true, isTextFieldHasSuffix: true,
suffixIcon: IconButton( suffixIcon: IconButton(
@ -609,6 +610,13 @@ getIcdCodeData() async{
} else { } else {
strengthError = null; strengthError = null;
} }
if (selectedDate == null ) {
dateError = TranslationBase.of(context).fieldRequired;
} else {
dateError = null;
}
if ( icdNameController.text == "" && widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty) { if ( icdNameController.text == "" && widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty) {
icdCodeError = TranslationBase.of(context).fieldRequired; icdCodeError = TranslationBase.of(context).fieldRequired;
} else { } else {

Loading…
Cancel
Save