Skip to content

Commit

Permalink
Add validate vs dirty check to price field (#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
HnKnA authored Oct 31, 2024
1 parent f3de565 commit fd49ac9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ProductGeneralInformation = ({ register, errors, setValue, watch }: Props)
setValue('taxClassId', data.taxClassId ?? '');
setValue('description', data.description ?? '');
setValue('specification', data.specification ?? '');
setValue('price', data.price ?? 0);
setValue('price', data.price ?? 0, { shouldValidate: true, shouldDirty: true });
setLoading(false);
})
.catch((error) => {
Expand Down

0 comments on commit fd49ac9

Please sign in to comment.