Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Apr 8, 2021
1 parent 640c945 commit fdd4f1f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { ROLLOVER_FORM_PATHS } from '../../../constants';
import { ROLLOVER_VALUE_REQUIRED_VALIDATION_CODE } from '../../../form';

export const useRolloverValueRequiredValidation = (): boolean => {
// We track just the ROLLOVER_FORM_PATHS.maxPrimaryShardSize field because if
// it has the ROLLOVER_VALUE_REQUIRED_VALIDATION_CODE error, all the other rollover
// fields should too.
const [formData] = useFormData({ watch: ROLLOVER_FORM_PATHS.maxPrimaryShardSize });
const rolloverFieldErrors: ValidationError[] =
get(formData, ROLLOVER_FORM_PATHS.maxPrimaryShardSize)?.errors ?? [];
Expand Down

0 comments on commit fdd4f1f

Please sign in to comment.