That's what im talking about. Thanks a mil Aloha.
On Wed, Mar 5, 2008 at 2:02 PM, Hugo Forte <h
...@hugoforte.com> wrote:
> Aloha,
> I added the following validator to my password, it could be modified
> as you see fit.
> //Password
> final TextField password = new TextField("Password",
> "password", 230);
> password.setAllowBlank(false);
> password.setPassword(true);
> accountInfo.add(password);
> //Retyped password
> final TextField passwordRetype = new TextField("Retype
> Password",
> "passwordRetype", 230);
> passwordRetype.setAllowBlank(false);
> passwordRetype.setPassword(true);
> Validator validatePassword = new Validator() {
> public boolean validate(String value)
> throws ValidationException {
> String passwordText = password.getText();
> if (!value.equals(passwordText)) {
> throw new ValidationException("Passwords do
> not match");
> } else if (value.length() < 6) {
> throw new ValidationException(
> "Password has to be at least 6 characters
> long");
> } else {
> return true;
> }
> }
> };
> passwordRetype.setValidator(validatePassword);
> On Mar 4, 1:55 pm, "Elvis Hlongwane" <lvcs...@gmail.com> wrote:
> > I sent the wrong question...
> > I wanted to ask about comparing the values of 2 fields when either of
> > the 2 fields looses focus and the field are both not empty.
> > More like validating password comfirmation.
> > Any done this before(Using Validator interface).
> > thanks.
> > On Tue, Mar 4, 2008 at 5:37 AM, alberto33 <albert...@gmail.com> wrote:
> > > Take a look at:
> > > http://gwt-ext.com/docs/gwtext2/com/gwtext/client/widgets/form/event/...
> > > On Feb 27, 5:52 pm, lvcster <lvcs...@gmail.com> wrote:
> > > > How do I call a method that might do a validation, or anything for
> > > > argument sake, when the field looses a focus.
> > > > Thanks in advance.
> > > > lvcster.
> > --
> > Elvis Hlongwane
> > Cel: 082 255 1532