andrebaltieri / Flunt

Validations and Notifications
https://github.com/andrebaltieri/flunt
MIT License
624 stars 162 forks source link

Add validation for max quantity of characters (IsMaxLength). #114

Closed MarcosCostaDev closed 1 year ago

MarcosCostaDev commented 1 year ago

Please, add validation for the max quantity of characters in a string.

        var contract = new Contract<Notification>();
        contract.IsMaxLength("My text here", 10, nameof(MyText), "Error on max quantity of characters");
andrebaltieri commented 1 year ago

Hi @MarcosCostaDev, how are you?

Does IsGreaterThan or IsGreaterOrEqualsThan works for this scenario?

MarcosCostaDev commented 1 year ago

Yes, I am using that. Just a suggestion to be more streightforword.

andrebaltieri commented 1 year ago

Great, thanks... will consider this on next version!