Sandra / Sandra.SimpleValidator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MaximumLength-rule: null-string causes validation error

PeterVD-Lansweeper opened this issue · comments

Hi,

When using your simple and clean framework, I noticed some strange (to me, that is :-) ) behavior.
If you leave a string field null, the MaximumLength-rule causes a validation error.

Is this intentional? Or should the MaximumLength.IsValid-method be changed to return true?

Kind regards,

Peter

Quick guess, this is where it's happening in the code ...

It's indeed that line, but in MaximumLength.cs. ;-)

In the meantime, I added the code to my project and modified that line.

Hey, I'm just in the middle of moving apartment, I need to update this, it's definitely not intentional.

If you want to fix it for me we accept PRs always :)

Massive PR is ready and waiting ;-)

image

Should be available sooooon. Let me know if there's any issues.

Thanks for fixing the issue. I'm crazy bust outside of work at the moment.