open System.Text.RegularExpressions
type Login = Login of string
type Email = Email of string
type Password = Password of string
type Role = Administrator | Moderator | Journalist | User
type Image = Image of string
type DateTime = DateTime of string
type String180 = String180 of string
shortText : string option
let createLogin (s : string) =
if s.Length <= 50 && Regex.IsMatch(s, @"^[A-Za-z0-9]+$")
let createEmail (s : string) =
if Regex.IsMatch(s, @"^\S+@\S+\.\S+$")
let createPassword (s : string) =
let createImage (s : string) =
if Regex.IsMatch(s.ToLower(), @"^*.(jpg|jpeg|png|bmp|gif)+$")
let createDateTime (s : string) =
if s.Length = 19 && Regex.IsMatch(s, @"^([0-9]{2}).([0-9]{2}).([0-9]{4})[-. ]?([0-9]{2}):([0-9]{2}):([0-9]{2})+$")
let createTag (s : string) =
if s.Length <= 20 && Regex.IsMatch(s, @"^[A-Za-zА-ЯЁа-яё0-9]+$")
let createString180 (s : string) =