validators2 5.1.1
validators2: ^5.1.1 copied to clipboard
String validation and sanitization for Dart.
5.1.1 #
- Fix excessive backtracking in
isEmailfor domains with many short labels. - Enforce domain label boundaries, rejecting empty labels, punctuation at label boundaries, and numeric starts to final labels that were previously accepted because dots could be consumed inside a label.
- Reject backslashes anywhere in URLs, including paths, queries and fragments, whether or not host lists are set.
- When either
isURLhost list is nonempty, require an explicit absolutehttp://,https://orftp://URL, even withrequireProtocol: false.protocolsstill restricts allowed schemes; it cannot enable custom schemes for host lists. Protocol-less inputs and custom schemes are rejected in this mode. With both lists empty, existing protocol behavior is unchanged. - Nonempty host lists reject Unicode URL hosts and noncanonical numeric IPv4
spellings. Host lists compare only hostnames, case-insensitively, ignoring
ports. Both lists must contain canonical ASCII hostnames (for example,
example.com,xn--bcher-kva.comor127.0.0.1), without schemes, ports or paths. Entries are only lowercased; Unicode and numeric aliases are not normalized to their canonical equivalents. - Correct FQDN label validation and IPv6 syntax checks, including compressed
addresses and IPv4 tails.
isIP(null)now returns false.
5.1.0 #
- upgraded packges, fixed lints.
5.0.0 #
- upgraded to dart 3.x
4.0.0 #
- Modernised the api to confirm to post 2.12 best practices. There are a number of small breaking changes, the main theme is changing optional args to named args with a default value.
3.0.0 #
temporary release until main authors can publish nnbd version. Migrated to nnbd
2.0.1 #
- Fix
isURLhostWhitelistandhostBlacklistinverted logic - Upgrade
vin_decoderto^0.1.2
2.0.0 #
- Change
isUrlandisFQDNoptionsparameter to be optional parameters
1.0.0 #
- migrate to dart 2 and fix tests