Package com.cmput301w23t09.qrhunter.util
Class ValidationUtils
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.util.ValidationUtils
-
public class ValidationUtils extends java.lang.ObjectUtility class to validate various inputs.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisValidEmail(java.lang.String email)Checks if the provided email is as valid email.static booleanisValidPhoneNo(java.lang.String phoneNo)Checks if the provided phone number is a valid phone number.static booleanisValidUsername(java.lang.String username)Checks if the provided username is a valid username that is between lengths 1-20 inclusive.
-
-
-
Method Detail
-
isValidUsername
public static boolean isValidUsername(java.lang.String username)
Checks if the provided username is a valid username that is between lengths 1-20 inclusive.- Parameters:
username- username to check- Returns:
- if the username is valid
-
isValidPhoneNo
public static boolean isValidPhoneNo(java.lang.String phoneNo)
Checks if the provided phone number is a valid phone number.- Parameters:
phoneNo- phone number to check- Returns:
- if the phone number is valid
-
isValidEmail
public static boolean isValidEmail(java.lang.String email)
Checks if the provided email is as valid email.- Parameters:
email- email to check- Returns:
- if the email is valid
-
-