You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2013/06/10 19:32:12 UTC
[2/2] git commit: Only perform validation on fields that are not
disabled
Only perform validation on fields that are not disabled
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8515eb9e
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8515eb9e
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8515eb9e
Branch: refs/heads/master
Commit: 8515eb9efc52b78e94ed0667016d91efa99a8739
Parents: 5cd24a5
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Jun 10 10:32:06 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Jun 10 10:32:06 2013 -0700
----------------------------------------------------------------------
.../coffeescript/META-INF/modules/t5/core/fields.coffee | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8515eb9e/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
index 9856914..32e12c2 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
@@ -98,11 +98,10 @@ define ["underscore", "./events", "./dom", "./builder", "./utils", "./forms"],
dom.onDocument events.field.inputValidation, (event, formMemo) ->
- # When not visible to the user, ignore the input validation. Components
- # are generally configured so that they do not submit a value to the server
- # when not visible ... this is what the core/FormFragment component is responsible
- # for.
- return unless @deepVisible()
+ # Fields that are disbled, or not visible to the user are not subject to
+ # validation. Typically, a field will only be invisible due to the
+ # core/FormFragment component.
+ return if @element.disabled or (not @deepVisible())
failure = false