You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/05/17 00:16:39 UTC
git commit: TAP5-2110: Missing JS for validators
Updated Branches:
refs/heads/master 2015f1ece -> ead83fb15
TAP5-2110: Missing JS for validators
MinLength and MaxLength validators don't import "t5/core/validation"
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ead83fb1
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ead83fb1
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ead83fb1
Branch: refs/heads/master
Commit: ead83fb154ce1a13865bcc76ff920c4e3789070b
Parents: 2015f1e
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu May 16 15:16:21 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu May 16 15:16:21 2013 -0700
----------------------------------------------------------------------
.../org/apache/tapestry5/validator/MaxLength.java | 4 +++-
.../org/apache/tapestry5/validator/MinLength.java | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ead83fb1/tapestry-core/src/main/java/org/apache/tapestry5/validator/MaxLength.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/validator/MaxLength.java b/tapestry-core/src/main/java/org/apache/tapestry5/validator/MaxLength.java
index e51e335..6254f4f 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/MaxLength.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/MaxLength.java
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2012 The Apache Software Foundation
+// Copyright 2007-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -49,6 +49,8 @@ public final class MaxLength extends AbstractValidator<Integer, String>
{
if (formSupport.isClientValidationEnabled())
{
+ javaScriptSupport.require("t5/core/validation");
+
writer.attributes(DataConstants.VALIDATION_ATTRIBUTE, true,
"data-validate-max-length", constraintValue.toString(),
"data-max-length-message", buildMessage(formatter, field, constraintValue));
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ead83fb1/tapestry-core/src/main/java/org/apache/tapestry5/validator/MinLength.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/validator/MinLength.java b/tapestry-core/src/main/java/org/apache/tapestry5/validator/MinLength.java
index 82338d1..f8fb44b 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/MinLength.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/MinLength.java
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2012 The Apache Software Foundation
+// Copyright 2007-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -49,6 +49,8 @@ public final class MinLength extends AbstractValidator<Integer, String>
{
if (formSupport.isClientValidationEnabled())
{
+ javaScriptSupport.require("t5/core/validation");
+
writer.attributes(DataConstants.VALIDATION_ATTRIBUTE, true,
"data-validate-min-length", constraintValue.toString(),
"data-min-length-message", buildMessage(formatter, field, constraintValue));