@@ -60,7 +60,9 @@ export const ExceptionFormPage: React.FC = () => {
60
60
. required ( 'Business name is required' ) ,
61
61
fileType : Yup . string ( ) . required ( 'File type is required' ) ,
62
62
fieldCode : Yup . string ( ) . required ( 'Field code is required' ) ,
63
- expiration_date : Yup . date ( ) . required ( 'Expiration date is required' ) ,
63
+ expiration_date : Yup . date ( ) . required ( 'Expiration date is required' )
64
+ . max ( '9999-12-31' , 'Expiration date must be MM/DD/YYYY' )
65
+ . min ( '0001-01-01' , 'Expiration date must be MM/DD/YYYY' ) ,
64
66
requested_threshold : Yup . number ( ) . required (
65
67
'Requested threshold is required'
66
68
) ,
@@ -79,7 +81,9 @@ export const ExceptionFormPage: React.FC = () => {
79
81
} ) ,
80
82
expirationDateOther : Yup . mixed ( ) . when ( 'exceptionType' , {
81
83
is : 'other' ,
82
- then : ( schema ) => Yup . date ( ) . required ( 'Required' ) ,
84
+ then : ( schema ) => Yup . date ( ) . required ( 'Required' )
85
+ . max ( '9999-12-31' , 'Date must be MM/DD/YYYY' )
86
+ . min ( '0001-01-01' , 'Date must be MM/DD/YYYY' ) ,
83
87
otherwise : ( schema ) => schema . strip ( ) ,
84
88
} ) ,
85
89
otherExceptionBusinessName : Yup . mixed ( ) . when ( 'exceptionType' , {
0 commit comments