Streaming live at 10am (PST)

Custom validation like petalcard.com (made in webflow too)


#1

Hey Guya,

I’m trying to implement validations and validation messages like

https://registration.petalcard.com/email

(another website made using webflow) and am at my wits end how to do so. Could someone point me to resources or tell me what library they used?

Validation types needed:
Email
Phone number
Date of birth


#2

Here’s something > https://webflow.com/website/Custom-Form-Validation

Hope this helps :webflow_heart:


#3

Thanks a lot @PiterDimitrov!

Part question: Any way to restrict only numbers/phone validation


#4

Hm I need to check. I don’t know, but I’m good searching google :smile:


#5

@PiterDimitrov Hey Peter! Any updates mate?


#6

I was trying to make some things, but I need to check deeper. Restricting phone numbers ect. There’s different phone patterns.


#7

@PiterDimitrov I understand. For my usercase, (and what petalcard.com did) was to restrict phone numbers by maximum digit (10 for the US). For eg Any number 8608840564 entered in the phone field it gets converted to this format (860) 994 - 0534

If there are more or less numbers, it shoots a validation error.

For the Zip code field they used similar logic to restrict max number to 6.

Hope this helps,
Saumik