vooga.users.ui
Class Validator

java.lang.Object
  extended by vooga.users.ui.Validator

public class Validator
extends java.lang.Object

Holds methods for checking whether or not a username or a password is valid. Edit this class to change validity rules.

Author:
Stephanie

Field Summary
(package private)  IVoogaGUI myGUI
           
 
Constructor Summary
Validator(IVoogaGUI gui)
           
 
Method Summary
 boolean isPasswordValid(java.lang.String password, java.lang.String passwordVerify)
          Return true if password is valid (is equal to or greater than minimum password length, and password equals verify password entry), false if not.
 boolean isUsernameValid(java.lang.String username)
          Return true if username is valid (not in the "restricted" list and not starting with a number), false if not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myGUI

IVoogaGUI myGUI
Constructor Detail

Validator

public Validator(IVoogaGUI gui)
Method Detail

isUsernameValid

public boolean isUsernameValid(java.lang.String username)
Return true if username is valid (not in the "restricted" list and not starting with a number), false if not.

Parameters:
username - to check if valid
Returns:
true if username valid

isPasswordValid

public boolean isPasswordValid(java.lang.String password,
                               java.lang.String passwordVerify)
Return true if password is valid (is equal to or greater than minimum password length, and password equals verify password entry), false if not.

Parameters:
password - to check if valid
passwordVerify - verify password entry, to check if equals password
Returns:
true if password valid