Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bahua128016yCharacter limits are implemented by devs who are too lazy to use a simple regular expression.
-
@besplash Please for the sake of us all: Learn them or at least use a validation library which uses regex for common input fields.
-
@besplash
I think it is great to start with simple regexes via
https://regex101.com/
and write some strings on which you want to succeed or fail your regex.
Then, for validating (and looking up regexes) you can visit: https://github.com/chriso/...
and look up the regexes in some of the files, like
isHexColor.js (to have an easy start) -
Fexell6566y@besplash Regex is really easy to use once you get the hang of it. It's such a quick study and there are tons of regex-tester websites that can make the learning process a lot more fun and easy.
-
@besplash Thanks! Remember to not overuse it, though and make something like that:
http://ex-parrot.com/~pdw/... -
bahua128016yhttp://regexr.com is a great place to test your expressions, and get a good explanation of everything that's going on.
Related Rants
User Ip Address is too long (maximum is 30 characters).
Okay, dear third-party API, I guess users with IPv6 don't deserve the service... And wtf is 30-char limit for an IP address, when IPv4 can be only 15 characters long, and IPv6 can be up to 39 characters? Did you calculate a weighted average of IP length to get that number?
rant
wtf
network
obsolete
ipv6
api