示例#1
0
        public override bool Validate(Model.User currentUser, CallbackQuery cquery = null, Message message = null)
        {
            if (cquery != null)
            {
                return(false);
            }

            if (message.Type == MessageType.Text && AskAction.BaseTextValidation(cquery, message))
            {
                return(Uri.IsWellFormedUriString(message.Text, UriKind.Absolute));
            }
            else if (message.Type == MessageType.Photo)
            {
                return(true);
            }

            return(false);
        }
示例#2
0
 public override bool Validate(Model.User currentUser, CallbackQuery cquery = null, Message message = null)
 {
     return(AskAction.BaseTextValidation(cquery, message) && byte.TryParse(message.Text, out _));
 }
示例#3
0
 public virtual bool Validate(Model.User currentUser, CallbackQuery cquery = null, Message message = null)
 {
     return(AskAction.BaseTextValidation(cquery, message));
 }