Module

HTTPurple.Validation

Package
purescript-httpurple
Repository
sigma-andex/purescript-httpurple

#fromValidated Source

fromValidated :: forall input err validated m. MonadAff m => (input -> Either err validated) -> input -> ContT Response m validated

Validate an input using a validate function. If validation fails, a bad request is resturned. Returns a continuation

#fromValidatedE Source

fromValidatedE :: forall input err validated m. MonadAff m => (input -> Either err validated) -> (err -> m Response) -> input -> ContT Response m validated

Validate an input using a validate function. If validation fails, the error handler is called. Returns a continuation