im working on some form/validation stuff right now and it seems to me that it would be cleaner to remove the RequiredValidator and instead introduce a required property (flag) for a form component.
there are a couple of reasons why i think this is better:
1) our validators will be cleaner. currently our validators dont know if null is a valid value so we always first check if the value is empty, and then if its not run the validator. take a look at PatternValidator:107. with this change validators wont run when the field is empty.
2) it is useful for other components to know if the field is required or not.
what do you guys think?
so instead of add(new TextField("foo").add(RequiredValidator.getInstance())) it will be add(new TextField("foo").setRequired(true));
-Igor
- [Wicket-develop] removing required validator Igor Vaynberg
- Re: [Wicket-develop] removing required validator Johan Compagner
- Re: [Wicket-develop] removing required validator Igor Vaynberg
- Re: [Wicket-develop] removing required valid... Eelco Hillenius
- Re: [Wicket-develop] removing required v... Igor Vaynberg
- Re: [Wicket-develop] removing requi... Eelco Hillenius
- Re: [Wicket-develop] removing r... Igor Vaynberg
- Re: [Wicket-develop] removi... Eelco Hillenius
- Re: [Wicket-develop] removi... Martijn Dashorst
- Re: [Wicket-develop] removi... Igor Vaynberg
- Re: [Wicket-develop] removi... Johan Compagner
