Skip to content

NthTensor/valid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valid

A validation library for gleam!

Validators are functions which check the properties of data and raise generic issues.

fn bounded(
  validator: Validator(x, Int, i),
  between min: Int,
  and max: Int,
  raise issue: i,
) -> Validator(x, Int, i) {
  use int <- extend(validator)
  case min < int && int < max {
    True -> valid(int)
    False -> invalid(int, issue)
  }
}

This package has not yet been published to Hex (but it will be as soon as I figure out how to do that).

About

✅ A validation library for gleam!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages