Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 398 Bytes

isValidPin.md

File metadata and controls

23 lines (13 loc) · 398 Bytes

isValidPin

Validates if the value has the required length.

Arguments

  • pin: string: value to be validated
  • pinLength: number: length of PIN. Default is 4

Usage

import { isValidPin } from '@platformbuilders/validations';

isValidPin('12'); // return false

isValidPin('1234'); // return true

isValidPin('1', 3); // return false

isValidPin('123', 3); // return true