@@ -26,10 +26,6 @@ public class BasicValidator extends BasicIdConfigType {
2626
2727 public static final String KEY_INFO = "info" ;
2828
29- public static final String KEY_OPTION1 = "option1" ;
30- public static final String KEY_OPTION2 = "option2" ;
31- public static final String KEY_OPTION3 = "option3" ;
32-
3329 public static final String ERROR_KEY_REQUIRED = "error.required" ;
3430 public static final String ERROR_KEY_LENGTH_MIN = "error.length.min" ;
3531 public static final String ERROR_KEY_LENGTH_MAX = "error.length.max" ;
@@ -42,15 +38,15 @@ public class BasicValidator extends BasicIdConfigType {
4238
4339 private String info ;
4440
45- private String option1 ;
46-
47- private String option2 ;
48-
49- private String option3 ;
50-
5141 private Element config ;
5242
43+ private Properties params ;
44+
5345 private BasicValidator parent ;
46+
47+ public BasicValidator () {
48+ this .params = new Properties ();
49+ }
5450
5551 /**
5652 *
@@ -100,18 +96,7 @@ public void configure( Properties atts ) throws ConfigException {
10096 if ( StringUtils .isNotEmpty ( info ) ) {
10197 this .info = info ;
10298 }
103- String opt1 = atts .getProperty ( KEY_OPTION1 );
104- if ( StringUtils .isNotEmpty ( opt1 ) ) {
105- this .option1 = opt1 ;
106- }
107- String opt2 = atts .getProperty ( KEY_OPTION2 );
108- if ( StringUtils .isNotEmpty ( opt2 ) ) {
109- this .option2 = opt2 ;
110- }
111- String opt3 = atts .getProperty ( KEY_OPTION3 );
112- if ( StringUtils .isNotEmpty ( opt3 ) ) {
113- this .option3 = opt3 ;
114- }
99+ this .getParams ().putAll ( atts );
115100 }
116101
117102 protected String checkOverride ( ValidatorContext context , String def , String key ) {
@@ -164,18 +149,6 @@ public String getInfo() {
164149 return info ;
165150 }
166151
167- public String getOption1 () {
168- return option1 ;
169- }
170-
171- public String getOption2 () {
172- return option2 ;
173- }
174-
175- public String getOption3 () {
176- return option3 ;
177- }
178-
179152 protected Element getConfig () {
180153 return config ;
181154 }
@@ -184,6 +157,10 @@ protected BasicValidator getParent() {
184157 return parent ;
185158 }
186159
160+ public Properties getParams () {
161+ return params ;
162+ }
163+
187164 @ Override
188165 public String toString () {
189166 return "Validator[id:" +this .getId ()+",type:" +this .getClass ().getName ()+"]" ;
0 commit comments