[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread Lenny Primak (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811713#comment-13811713
 ] 

Lenny Primak commented on TAP5-2158:


Looks good

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
> Fix For: 5.4
>
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811630#comment-13811630
 ] 

Hudson commented on TAP5-2158:
--

FAILURE: Integrated in tapestry-trunk-freestyle #1174 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/1174/])
TAP5-2158: Client-side validation of @Size is not working when only min 
(thiagohp: rev 9c574e7a5f9e3b4ba7e99e63d89cc2b3cc3900c0)
* 
tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java


> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
> Fix For: 5.4
>
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811613#comment-13811613
 ] 

ASF subversion and git services commented on TAP5-2158:
---

Commit 9c574e7a5f9e3b4ba7e99e63d89cc2b3cc3900c0 in branch refs/heads/master 
from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=9c574e7 ]

TAP5-2158: Client-side validation of @Size is not working when only min
or max is set. Added another test. Code that fixes this for jQuery is
actually in tapestry-core itself.

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
> Fix For: 5.4
>
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread Lenny Primak (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811414#comment-13811414
 ] 

Lenny Primak commented on TAP5-2158:


I believe that this issue is only fixed for prototype, but for JQuery DOM 
backing, this issue still exists

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
> Fix For: 5.4
>
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811209#comment-13811209
 ] 

Hudson commented on TAP5-2158:
--

FAILURE: Integrated in tapestry-trunk-freestyle #1173 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/1173/])
TAP5-2158: Client-side validation of @Size is not working when only min 
(thiagohp: rev a073dc01c55a8316c63096a89a7424066128b821)
* 
tapestry-beanvalidator/src/test/java/org/example/testapp/entities/TestEntity.java
* 
tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java


> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
> Fix For: 5.4
>
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-11-01 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811199#comment-13811199
 ] 

ASF subversion and git services commented on TAP5-2158:
---

Commit a073dc01c55a8316c63096a89a7424066128b821 in branch refs/heads/master 
from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=a073dc0 ]

TAP5-2158: Client-side validation of @Size is not working when only min
or max is set. Actually, it was already fixed, probably by some change
to Element.attribute() in JavaScript, so I just added some tests
covering this ticket.

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Assignee: Thiago H. de Paula Figueiredo
>Priority: Minor
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-09-09 Thread Lenny Primak (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762044#comment-13762044
 ] 

Lenny Primak commented on TAP5-2158:


I would say this is a critical bug, not minor. 

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Priority: Minor
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (TAP5-2158) Client-side validation of @Size is not working when only min or max is set

2013-08-17 Thread JIRA

[ 
https://issues.apache.org/jira/browse/TAP5-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743004#comment-13743004
 ] 

Balázs Palcsó commented on TAP5-2158:
-

Browser: Chrome Version 28.0.1500.95 m
OS: Win 7

> Client-side validation of @Size is not working when only min or max is set
> --
>
> Key: TAP5-2158
> URL: https://issues.apache.org/jira/browse/TAP5-2158
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-beanvalidator
>Affects Versions: 5.4
>Reporter: Balázs Palcsó
>Priority: Minor
>
> Exact version: 5.4-alpha-14
> Server side example:
> {code}
> @Size(min = 3)
> private String name;
> {code}
> On the client side the following function gets executed:
> {code}
> doRangeValidate = function(element, value, memo) {
>   var max, min;
>   min = rangeValue(element, "data-range-min", 0);
>   max = rangeValue(element, "data-range-max", Number.MAX_VALUE);
>   if (_.isString(value)) {
> value = value.length;
>   }
>   if (!((min <= value && value <= max))) {
> memo.error = (element.attribute("data-range-message")) || "RANGE 
> ERROR";
> return false;
>   }
>   return true;
> };
> {code}
> In the above example max is evaluated to NaN and therefore the function 
> returns false causing validation error.
> Same applies when you only max is specified in @Size annotation and min is 
> evaluated to NaN.
> h3. Workaround 
> Specify both min and max.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira