Beispiel #1
0
        public ValidateOptions AddRule(string key, RuleItemValidate rule, string mensagem)
        {
            rules = rules ?? new RulesValidate();
            rules.Add(key, rule);

            messages = messages ?? new MessagesValidate();
            messages.Add(key, new MessageItemValidate()
            {
                required = mensagem
            });

            return(this);
        }
Beispiel #2
0
 public ValidateOptions AddRule(string key, RuleItemValidate rule)
 {
     return(AddRule(key, rule, "Esse campo é obrigatório."));
 }