Permalink
Browse files

Adding the Optional method

This allows for checking if the current element is optional or required.
  • Loading branch information...
1 parent d991176 commit d6134bad0b91b0ad6258d9fd1635e231084f61dc @michaelaird michaelaird committed Jul 30, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/Libraries/jQuery/jQuery.Validation/jQueryValidator.cs
View
8 src/Libraries/jQuery/jQuery.Validation/jQueryValidator.cs
@@ -72,6 +72,14 @@ public sealed class jQueryValidator {
public int GetInvalidFieldCount() {
return 0;
}
+ /// <summary>
+ /// Checks if the current element is optional.
+ /// </summary>
+ /// <param name="element">The element to validate</param>
+ /// <returns>True if the element is optional, otherwise returns false.</returns>
+ public static bool Optional(Element element) {
+ return false;
+ }
/// <summary>
/// Resets the controlled form

0 comments on commit d6134ba

Please sign in to comment.