Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andevsoftware/28b0a8462ccd50967ac7 to your computer and use it in GitHub Desktop.
Save andevsoftware/28b0a8462ccd50967ac7 to your computer and use it in GitHub Desktop.
TSValidate.Validators.StringLength
import StringLength = TSValidate.Validators.StringLength;
validation.add('name_last', new StringLength()
.max(50)
.min(2)
.messageMaximum('We don\'t like really long names')
.messageMinimum('We want more than just their initials')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment