RegexLabels constructor

const RegexLabels({
  1. String minLength(
    1. int length
    ) = _minLength,
  2. String maxLength(
    1. int length
    ) = _maxLength,
  3. String lengthBetween(
    1. int min,
    2. int max
    ) = _lengthBetween,
  4. String exactLength(
    1. int length
    ) = _exactLength,
  5. String uppercase(
    1. int length
    ) = _uppercase,
  6. String lowercase(
    1. int length
    ) = _lowercase,
  7. String digit(
    1. int length
    ) = _digit,
  8. String special(
    1. int length
    ) = _special,
  9. String noRepeating(
    1. int length
    ) = _noRepeating,
  10. String startsWith(
    1. String text
    ) = _startsWith,
  11. String notStartsWith(
    1. String text
    ) = _notStartsWith,
  12. String endsWith(
    1. String text
    ) = _endsWith,
  13. String contains(
    1. String text
    ) = _contains,
  14. String only(
    1. String text
    ) = _only,
  15. String none(
    1. String text
    ) = _none,
  16. String join(
    1. List<String> words
    ) = _join,
  17. Map<RegexChar, String> chars = const {},
  18. String space = 'spaces',
  19. String noSpaces = 'No spaces',
  20. String email = 'Valid e-mail address',
  21. String phone = 'Valid phone number',
  22. String url = 'Valid web address',
  23. String iban = 'Valid IBAN',
  24. String sameAs = 'Passwords must match',
  25. String required = 'Required',
  26. String notContains = 'Does not contain your name',
  27. String met = 'met',
  28. String unmet = 'not met',
  29. List<String> strength = const ['Very weak', 'Weak', 'Fair', 'Good', 'Strong'],
  30. String show = 'Show password',
  31. String hide = 'Hide password',
  32. String passwordField = 'Password',
  33. String emailField = 'E-mail',
  34. String userNameField = 'User name',
})

Creates labels; anything left out stays English.

Implementation

const RegexLabels({
  this.minLength = _minLength,
  this.maxLength = _maxLength,
  this.lengthBetween = _lengthBetween,
  this.exactLength = _exactLength,
  this.uppercase = _uppercase,
  this.lowercase = _lowercase,
  this.digit = _digit,
  this.special = _special,
  this.noRepeating = _noRepeating,
  this.startsWith = _startsWith,
  this.notStartsWith = _notStartsWith,
  this.endsWith = _endsWith,
  this.contains = _contains,
  this.only = _only,
  this.none = _none,
  this.join = _join,
  this.chars = const {},
  this.space = 'spaces',
  this.noSpaces = 'No spaces',
  this.email = 'Valid e-mail address',
  this.phone = 'Valid phone number',
  this.url = 'Valid web address',
  this.iban = 'Valid IBAN',
  this.sameAs = 'Passwords must match',
  this.required = 'Required',
  this.notContains = 'Does not contain your name',
  this.met = 'met',
  this.unmet = 'not met',
  this.strength = const ['Very weak', 'Weak', 'Fair', 'Good', 'Strong'],
  this.show = 'Show password',
  this.hide = 'Hide password',
  this.passwordField = 'Password',
  this.emailField = 'E-mail',
  this.userNameField = 'User name',
});