You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2008/05/23 21:44:07 UTC
[jira] Commented: (WW-2002) Inconsistent client/server validation
using RequiredFieldValidator
[ https://issues.apache.org/struts/browse/WW-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43939#action_43939 ]
Musachy Barroso commented on WW-2002:
-------------------------------------
That distinction cannot be done in javascript. In javascript, even if a field has no value, its value is "", instead of null (like in java). That's why you need to use "requiredstring" as it will check for the string size.
> Inconsistent client/server validation using RequiredFieldValidator
> ------------------------------------------------------------------
>
> Key: WW-2002
> URL: https://issues.apache.org/struts/browse/WW-2002
> Project: Struts 2
> Issue Type: Bug
> Components: XML Validators
> Affects Versions: 2.0.8, 2.0.9
> Environment: Windows 2000, Tomcat 5.5.23, java 1.6.0_01
> Reporter: Marc-André Thibodeau
> Fix For: 2.1.3
>
>
> We noticed different behaviors between client-side and server-side validations using a RequiredFieldValidator annotation. Using this annotation, an empty field is considered invalid when validated on the client-side, while it is accepted by the server-side validation (when javascript is not supported). It does not downgrade gracefully.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.