Created
December 20, 2025 02:41
-
-
Save gmdias727/2a06d50f0b3c10deefcb2ee9d05f462d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let is_valid ~email = | |
| match (String.length email, email) with | |
| | (0, _) -> Error "empty email is not valid" | |
| | (len, _) when len > max_email_length -> Error "Email length exceeds the limit" | |
| | (_, email) when string_is_bigger_than max_email_length [email] -> Error "Email is bigger than the limitations" | |
| | _ -> Ok () |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
email.mli: