From 70a2671c6951cdc023e8eca58523baa022cbccb2 Mon Sep 17 00:00:00 2001 From: Santiago Revilla Date: Fri, 27 Sep 2019 12:36:45 -0300 Subject: [PATCH] Use message field.{propery} for error message --- .../qi-core/src/main/java/org/jpos/qi/util/FieldFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/qi-core/src/main/java/org/jpos/qi/util/FieldFactory.java b/modules/qi-core/src/main/java/org/jpos/qi/util/FieldFactory.java index abc2285a2c..076fef4300 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/util/FieldFactory.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/util/FieldFactory.java @@ -190,9 +190,9 @@ public List getValidators(String propertyId) { return null; } if (regex != null) - validators.add(new RegexpValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage(propertyId)),regex)); + validators.add(new RegexpValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage("field." + propertyId)),regex)); if (length > 0) - validators.add(new StringLengthValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage(propertyId)),0,length)); + validators.add(new StringLengthValidator(getApp().getMessage("errorMessage.invalidField", getApp().getMessage("field." + propertyId)),0,length)); if ("email".equals(propertyId)) { validators.add(new EmailValidator(getApp().getMessage("errorMessage.invalidEmail")) { @Override