Skip to content

Instantly share code, notes, and snippets.

@karlseguin
Created April 9, 2010 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save karlseguin/361299 to your computer and use it in GitHub Desktop.
Save karlseguin/361299 to your computer and use it in GitHub Desktop.
public class Step3Validator : ClassValidator<Step3>
{
public Step3Validator()
{
RuleFor(s => s.MessageGroup).Required().WithMessage("This field is required");
RuleFor(s => s.MessageGroup).Length(5, 5).Pattern(ValidationPattern.Number).WithMessage("Please enter a 5 digit number");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment