Skip to content

[General]: suggestion of new validatorsΒ #157

@ArturAssisComp

Description

@ArturAssisComp

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

12.0.0

What you'd like to happen

The following validators were not implemented yet. They are interesting because they are complementary to some of the existent validators.

File validators

  • Validators.minFileSize(min, base:base): Checks if the field contains a file size that is less than the max size with base 1000 or 1024. (complement to maxFileSize.

String validators

  • Validators.notContains(substring) - Checks if the field does not contain the substring. (complements contains.
  • FormBuilderValidators.notEndsWith() - requires the substring not to be the end of the field's value. (complements endsWith)
  • FormBuilderValidators.notStartsWith() - requires the substring not to be the start of the field's value. (complements startsWith)
  • Validators.hasMaxUppercaseChars(max:max) - Checks if the field has a maximum number of uppercase chars. (complements hasMinUppercaseChars)
  • Validators.hasMaxLowercaseChars(max:max) - Checks if the field has a maximum number of lowercase chars. (complements hasMinLowercaseChars)
  • Validators.hasMaxNumericChars(max:max) - Checks if the field has a maximum number of numeric chars. (complements hasMinNumericChars)
  • Validators.hasMaxSpecialChars(max:max) - Checks if the field has a maximum number of special chars. (complements hasMinSpecialChars)
  • Validators.notMatch(regExp) - Checks if the field does not match with the regular expression regExp. (complements match)

Alternatives you've considered

No response

Aditional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions