Skip to content

Validate ​

The /validate endpoint validates various data formats.

Parameters ​

ParameterRequiredDescription
typeYesValidation type: luhn, iban, email
valueYesValue to validate

Validation Types ​

TypeDescriptionLimits
luhnLuhn algorithm (credit card numbers)12–19 digits
ibanInternational Bank Account Number15–34 characters
emailEmail address format

Response Fields ​

FieldTypeDescription
validbooleanWhether the value is valid
valuestringThe validated value
countrystringCountry code (IBAN only)

Code Examples ​

curl -X GET \
  "https://api.sylvain.sh/v6/validate?type=email&value=user%40example.com"

Try It ​

Error Handling ​

If parameters are missing or invalid, the API will return an error:

Error MessageDescription
Please provide a valid type (?type={luhn|iban|email})The type parameter is missing or invalid
A value is requiredThe value parameter is missing