You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by mi...@apache.org on 2016/02/01 18:25:56 UTC
[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-35025 Now
all ValidationResultEvents are passed through handleResults().
FLEX-35025
Now all ValidationResultEvents are passed through handleResults().
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/99be0d34
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/99be0d34
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/99be0d34
Branch: refs/heads/develop
Commit: 99be0d34018cdbd6cf640beaeb0758f0d474777c
Parents: a9eebe6
Author: Mihai Chira <mi...@apache.org>
Authored: Mon Feb 1 18:13:15 2016 +0100
Committer: Mihai Chira <mi...@apache.org>
Committed: Mon Feb 1 18:13:15 2016 +0100
----------------------------------------------------------------------
frameworks/projects/framework/src/mx/validators/Validator.as | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/99be0d34/frameworks/projects/framework/src/mx/validators/Validator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/validators/Validator.as b/frameworks/projects/framework/src/mx/validators/Validator.as
index eabe58f..f526b5b 100644
--- a/frameworks/projects/framework/src/mx/validators/Validator.as
+++ b/frameworks/projects/framework/src/mx/validators/Validator.as
@@ -919,11 +919,10 @@ public class Validator extends EventDispatcher implements IMXMLObject,IValidator
{
// We assume if value is null and required is false that
// validation was successful.
- var resultEvent:ValidationResultEvent =
- new ValidationResultEvent(ValidationResultEvent.VALID);
+ var resultEvent:ValidationResultEvent = handleResults(null);
if (!suppressEvents && _enabled)
{
- dispatchEvent(resultEvent);
+ dispatchEvent(resultEvent);
}
return resultEvent;
}
@@ -1080,7 +1079,7 @@ public class Validator extends EventDispatcher implements IMXMLObject,IValidator
{
var resultEvent:ValidationResultEvent;
- if (errorResults.length > 0)
+ if (errorResults != null && errorResults.length > 0)
{
resultEvent =
new ValidationResultEvent(ValidationResultEvent.INVALID);