CargoSense / vex

Data Validation for Elixir
MIT License
595 stars 60 forks source link

Invalid uuid validated #59

Open datafoo opened 5 years ago

datafoo commented 5 years ago

A uuid with characters outside the hexadecimal characters is wrongly validated.

Example: a462cc9d-4322-4c96-a195-f8e1b00881fg

iex(1)> Vex.Validators.Uuid.validate("a462cc9d-4322-4c96-a195-f8e1b00881fg", format: :default)
:ok
iex(2)> UUID.info("a462cc9d-4322-4c96-a195-f8e1b00881fg")
{:error,
 "Invalid argument; Not a valid UUID: a462cc9d-4322-4c96-a195-f8e1b00881fg"}