Module

HomeRunBall

Package
purescript-home-run-ball
Repository
justinwoo/purescript-home-run-ball

#checkRules Source

checkRules :: forall rl errors row a. RowToList row rl => CheckRules rl errors row a => RProxy row -> a -> VS errors row a

Check a string for validation rules provided by a row proxy and return a validation result

#BeginsWith Source

data BeginsWith (s :: Symbol)

Rule for checking what the string begins with

Instances

#EndsWith Source

data EndsWith (s :: Symbol)

Rule for checking what the string ends with

Instances

#Contains Source

data Contains (s :: Symbol)

Rule for checking what the string contains

Instances

#Capitalized Source

data Capitalized

Rule for checking if the string is capitalized

Instances

#AllCaps Source

data AllCaps

Rule for checking if the string is all caps

Instances

#Lowercase Source

data Lowercase

Rule for checking if the string is all lowercase

Instances

#ValidatedValue Source

type ValidatedValue (rules :: Row Type) a = Const a (RProxy rules)

Type alias for a validated string and its rules

#VS Source

type VS errors rules a = V (NonEmptyList (Variant errors)) (ValidatedValue rules a)

Type alias for a string validation result, with a list of labels that failed validation

#CheckRules Source

class CheckRules (rl :: RowList) (errors :: Row Type) (rules :: Row Type) a | rl -> errors rules where

Members

Instances

Modules
HomeRunBall