matheusgontijo

matheusgontijo

Hey dear #AlchemistFriends! I’m creating a :check_mark::check_mark: validation engine :check_mark::check_mark:, in order to put several day-to-day validation rules all together!!!
If you folks could take a look real quick and provide me some feedback, that would be just fantastic to listen from you :+1::+1::+1:

https://github.com/elixir-validation/validation

Some validation rules for instance: Email, Credit Card, Barcode, IBAN, WordCount, PostalCode (us, uk, br…), CountryCode, MacAddress.. and +65 other ;- )

P.S.: I’m very-very-very new to the Elixir ecosystem. Literally just 2 weeks learning the language & writing code. Please :folded_hands::folded_hands: be a bit merciful (hehe). Thanks for your understanding.

Showing Posts 1 to 1

hauleth

hauleth

Just to point out, while it is deprecated it is perfectly valid email:

foo(@)@baz.com

And I believe your regex will mark it as invalid. You have 2 options how to approach such data as this one:

  • Strictly follow RFC2822 (but for example use flags to disallow some features like comments)
  • Use HTML5 default regex, which is not correct, but at least it will match the same expectations as browser does

Otherwise it ends somewhere in between and can be a little bit confusing (ignoring fact that such long regex is very easy to abuse and force engine to do matching in O(n^2)).

EDIT:

Also it is hard to tell in your alphanumeric/alpha/etc. work within Unicode groups or not. Is string ٠ numeric or not? This character is U+0660 Arabic-Indic Digit Zero, so it is digit, but I think that You do not expected that.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews