Hex Core JS
    Preparing search index...

    Function checkPerformValidation

    • Determines if field validation should be peformed. Used to prevent unncessary validation on mount.

      The overall strategy with this function is to perform validation only when a field has been changed, when submission begins, and when the validation status is being displayed.

      This function should return true (indicating validation should be performed) in a (weak) superset of all cases in which checkShowFieldValidation returns true (indicating validation status should be shown) so that validation has always been performed (or is being performed) if it is displayed to the user.

      On the check conditions (compared to checkShowFieldValidation):

      1. Validation display policy is ignored.
      2. Instead of just showing after submit (submitCount > 0), perform validation when submission has begun so that validation is performed prior to submitting. Also perform validation after submit so that displays are updated.
      3. Only show validation if wasTouched and in a create form. Ignoring the wasTouched && wasChanged condition when in an update form due to the next condition.
      4. Show validation when changed.

      Parameters

      Returns boolean