Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 557 Bytes

isValidSocialUsername.md

File metadata and controls

21 lines (14 loc) · 557 Bytes

isValidSocialUsername

Validates if the string has at least two valid non-numeric names

Arguments

  • name: string: value to be validated

Usage

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

isValidSocialUsername('instagram'); // return false
isValidSocialUsername('@me'); // return false
isValidSocialUsername('@me', 2); // return true
isValidSocialUsername('@me', 2, '#'); // return false
isValidSocialUsername('#me', 2, '#'); // return true

isValidSocialUsername('@platformbuilders.io'); // return true