1.6.3 • Published 3 years ago

@validate-phone/antd-input v1.6.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

antd phone number validation input

  • Extends ant's FormItem and Input components
  • Utilizes validatephonenumber.com free API

Install

npm i @validate-phone/antd-input

How to use

import { PhoneInput, PhoneInputFormItem } from '@validate-phone/antd-input'
import { Form } from 'antd'

export function MyApp() {
  return (
    <Form>
      <PhoneInputFormItem
        name="phone"
        label="Phone number"
        errorMessage="Please provide a valid phone number"
        hasFeedback
      >
        <PhoneInput />
      </PhoneInputFormItem>
    </Form>
  )
}
export interface PhoneInputFormItemProps extends FormItemProps {
  skipValidityCheck?: boolean
  errorMessage?: string
  // Recognise local phone numbers in country
  // default: US
  countryCode?: string
}
export interface PhoneInputProps extends InputProps {}
1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.3

3 years ago