@carlosurias/jsforms
v1.0.6
Published
Downloads
1
Readme
JSForms
Functions
validatePhoneNumber(phoneNumber)
Validates a 10-digit phone number. Use this to verify phone numbers in user registration or contact forms.
validateCreditCard(cardNumber, length)
Validates a credit card number and checks it with the Luhn algorithm. Use this for payment forms or card validation.
validateEmail(email)
Checks if an email address is valid. Use this to verify email addresses during user sign-up or contact forms.
onlyLetters(str)
Checks if a string contains only letters. Use this to ensure input fields like names or surnames contain only alphabetic characters.