Alphabetic validation for React JS

 Alphabetic validation for React JS

export const alphabeticStringValidation = val => {
    const regex = /^[A-Za-z\-_]+$/;  //substitute: /^[A-Za-z]+$/without letters
    return regex.test(val);
}
 
 

Comments

Popular posts from this blog

Image Preview Before upload image into ReactJs

Format mobile number to this format "(845) 963-2545" #mobileFormat