Menu

1 / 2

I Built a Batch Validation API That Replaces 10 Different APIs in One Call

DEV Community·Rijul·6 months ago
#zwe4GaPq
#python#api#webdev#valid#field_name
Reading 0:00
15s threshold

If you've ever built a form backend or an automation workflow,

you know the pain: you need to validate an email, a phone number,

an IBAN, a credit card, and a URL — and you end up calling five

different APIs to do it.

I built MultiValidator to fix that. One API call. Up to 50 fields.

13 format types. Here's how it works and how I built it in a weekend.

What it does

Send a batch of fields, get back validation results for all of them:

import requests

payload = { " fields " : [ { " type " : " email " , " value " : " [email protected] " , " field_name " : " email " }, { " type " : " phone " , " value " : " +447911123456 " , " field_name " : " mobile " }, { " type " : " iban " , " value " : " GB29NWBK60161331926819 " , " field_name " : " bank " }, { " type " : " credit_card " , " value " : " 4111111111111111 " , " field_name " : " card " }, { " type " : " url " , " value " : " https://example.com " , " field_name " : " website " } ] }

response = requests .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.