Package com.day.cq.wcm.foundation.forms
Class ValidationHelper
- java.lang.Object
-
- com.day.cq.wcm.foundation.forms.ValidationHelper
-
@Deprecated public class ValidationHelper extends java.lang.Object
Deprecated.Check the methods for alternatives.Helper class for the forms components for validation.
-
-
Method Summary
-
-
-
Method Detail
-
getValidationInfo
@Deprecated public static ValidationInfo getValidationInfo(SlingHttpServletRequest request)
Deprecated.Return the current validation info for server side validation- Parameters:
request
- The current request- Returns:
- The validation info object.
-
hasValidationInfo
@Deprecated public static boolean hasValidationInfo(HttpServletRequest request)
Deprecated.Check if there are validation errors for the current request.- Parameters:
request
- The curren t request.- Returns:
true
if there are validation errors.
-
getRequiredMessage
@Deprecated public static java.lang.String getRequiredMessage(Resource resource)
Deprecated.Use aFieldDescription
instead.Return the required message for this element.- Parameters:
resource
- The form element resource.- Returns:
- The required message.
-
getConstraintMessage
@Deprecated public static java.lang.String getConstraintMessage(Resource resource)
Return the constraint message for this element.- Parameters:
resource
- The form element resource.- Returns:
- The constraint message.
-
checkRequired
@Deprecated public static boolean checkRequired(SlingHttpServletRequest request, Resource resource)
Convenience method to check the required flag of a form element.- Parameters:
request
- requestresource
- The form element resource.- Returns:
- true if check passed.
-
checkConstraint
@Deprecated public static void checkConstraint(SlingHttpServletRequest request, SlingHttpServletResponse response, Resource resource) throws java.io.IOException, ServletException
Deprecated.Convenience method to check the constraint of a form element.- Parameters:
request
- requestresponse
- responseresource
- The form element resource.- Throws:
java.io.IOException
- if check caused an error $throws ServletException if check caused an errorServletException
-
writeRequiredCheck
@Deprecated public static void writeRequiredCheck(SlingHttpServletRequest request, Resource resource, JspWriter out) throws java.io.IOException
Deprecated.Write java script client code for a required check.- Parameters:
request
- requestresource
- resourceout
- out- Throws:
java.io.IOException
- if write caused an error
-
getFormElementQualifier
@Deprecated public static java.lang.String getFormElementQualifier(SlingHttpServletRequest request, Resource resource)
- Parameters:
request
- requestresource
- resource
-
writeConstraintCheck
@Deprecated public static void writeConstraintCheck(SlingHttpServletRequest request, SlingHttpServletResponse response, Resource resource, JspWriter out) throws java.io.IOException, ServletException
Deprecated.Write java script client code for a constraint check.- Parameters:
request
- requestresponse
- responseresource
- resourceout
- out- Throws:
java.io.IOException
- if write caused an errorServletException
- if write caused an error
-
writeRegexpText
@Deprecated public static void writeRegexpText(SlingHttpServletRequest request, Resource resource, java.lang.String regexp, JspWriter out) throws java.io.IOException
Deprecated.Write java script client code for a regexp.- Parameters:
request
- requestresource
- resourceregexp
- regexpout
- out- Throws:
java.io.IOException
- if write caused an error
-
-