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

Loading…
Cancel
Save