diff --git a/source/frontend/src/features/properties/filter/PropertyFilter.tsx b/source/frontend/src/features/properties/filter/PropertyFilter.tsx index 6c6a937152..728049f238 100644 --- a/source/frontend/src/features/properties/filter/PropertyFilter.tsx +++ b/source/frontend/src/features/properties/filter/PropertyFilter.tsx @@ -116,12 +116,17 @@ export const PropertyFilter: React.FC { setFieldValue('latitude', null); setFieldValue('longitude', null); + setFieldValue('pinOrPid', null); }} /> {values.searchBy === 'pinOrPid' && ( - + )} {values.searchBy === 'address' && useGeocoder && ( searchButtonClicked && searchButtonClicked()} /> diff --git a/source/frontend/src/utils/YupSchema.ts b/source/frontend/src/utils/YupSchema.ts index 9ec526e144..6846481576 100644 --- a/source/frontend/src/utils/YupSchema.ts +++ b/source/frontend/src/utils/YupSchema.ts @@ -27,14 +27,5 @@ export const UserUpdateSchema = Yup.object().shape({ }); export const FilterBarSchema = Yup.object().shape({ - minLotSize: Yup.number() - .typeError('Invalid') - .positive('Must be greater than 0') - .max(200000, 'Invalid'), - maxLotSize: Yup.number() - .typeError('Invalid') - .positive('Must be greater than 0') - .max(200000, 'Invalid') - /* Reference minLotSize field in validating maxLotSize value */ - .moreThan(Yup.ref('minLotSize'), 'Must be greater than Min Lot Size'), + pinOrPid: Yup.string().matches(/^\d{0,3}-\d{3}-\d{3}$|^\d{0,9}$/, 'Invalid PIN or PID'), });