Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Request = {name:string; email:string}
- let validateInput input =
- if input.name = "" then Failure "Name must not be blank"
- else if input.email = "" then Failure "Email must not be blank"
- else Success input // happy path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement