Hi
The current build of FV doesn't support custom rules within top level conditions. I hope to address this in a future release.
Jeremy Skinner
Jeremy Skinner
Sent from my iPhone
From: shapper
Hello,
I have the following:
When(x => x.Mark == MarkType.Annex, () => {
Custom(x => {HttpPostedFileBase file = x.Files.First();
if (file.ContentLength > 20971520)
new ValidationFailure("Files", "The maximum file size is 20 MB");
return null;
});
});When I submit the form the x.Files.First() gives an error ...
However, this should not even run because x.Mark is not Annex and the condition is false.
I debugged it and the condition is really false.
Any idea what is wrong?
Thank you,
Miguel