@karmaniverous/hook-form-semantic
    Preparing search index...

    Function makePhoneValidate

    • react-hook-form validate rule for a phone field.

      Accepts any leading fragment of the current dial code (e.g. +, +1) so validation does not fire while the user is still typing the country code; anything longer must be a valid number.

      Parameters

      • prefix: string
      • dialCode: string

      Returns (value: string) => string | true