Package sonia.scm.util
Class ValidationUtil
java.lang.Object
sonia.scm.util.ValidationUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isFilenameValid
(String filename) static boolean
isMailAddressValid
(String mail) static boolean
isNameValid
(String name) static boolean
isNotContaining
(String value, String... notAllowedStrings) Returnstrue
if the object is valid.static boolean
isPasswordValid
(String password) static boolean
isPathValid
(String path) Checks if the path is a valid path and does not enable path traversalstatic boolean
isRepositoryNameValid
(String name) static boolean
isValid
(Validateable validatable) Returnstrue
if the object is valid.
-
Field Details
-
REGEX_NAME
- See Also:
-
REGEX_REPOSITORYNAME
- See Also:
-
-
Method Details
-
isFilenameValid
-
isPathValid
Checks if the path is a valid path and does not enable path traversal- Parameters:
path
- path to be validated- Returns:
true
if path is valid else false
-
isMailAddressValid
-
isNameValid
-
isPasswordValid
-
isNotContaining
Returnstrue
if the object is valid.- Parameters:
value
- value to be checkednotAllowedStrings
- one or more strings which should not be included in value- Returns:
true
if string has no not allowed strings else false
-
isRepositoryNameValid
- Since:
- 1.9
-
isValid
Returnstrue
if the object is valid.- Parameters:
validatable
- object to be validated- Returns:
true
if object is valid
-