This question is locked. New answers and comments are not allowed.
Hello,
i have a custom ValidationAttribute:
I register the validator on clientside:
The validation on clientside will never run. in a "normal" form without a grid everything works fine.
Which is the way to run this validation inside the grid? Extend jquery.validate?
Regards,
Timo
i have a custom ValidationAttribute:
public sealed class DateCompareAttribute : ValidationAttribute { private const string DefaultErrorMessage = "..."; public DateCompareAttribute( string loweredOrEqualDateTimeProperty, bool includeEqual ) : base( DefaultErrorMessage ) { LoweredOrEqualDateTimeProperty = loweredOrEqualDateTimeProperty; IncludeEqual = includeEqual; } // ... }I register the validator on clientside:
<script type="text/javascript"> Sys.Mvc.ValidatorRegistry.validators.dateCompare = function (rule) { var p = rule.ValidationParameters.loweredOrEqualDateTimeProperty; var ie = rule.ValidationParameters.includeEqual; return function (value, context) { return false; }; }; </script>The validation on clientside will never run. in a "normal" form without a grid everything works fine.
Which is the way to run this validation inside the grid? Extend jquery.validate?
Regards,
Timo