Package sonia.scm.util
Class ValidationUtil
java.lang.Object
sonia.scm.util.ValidationUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisFilenameValid(String filename) static booleanisMailAddressValid(String mail) static booleanisNameValid(String name) static booleanisNotContaining(String value, String... notAllowedStrings) Returnstrueif the object is valid.static booleanisPasswordValid(String password) static booleanisPathValid(String path) Checks if the path is a valid path and does not enable path traversalstatic booleanisRepositoryNameValid(String name) static booleanisValid(Validateable validatable) Returnstrueif 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:
trueif path is valid else false
-
isMailAddressValid
-
isNameValid
-
isPasswordValid
-
isNotContaining
Returnstrueif the object is valid.- Parameters:
value- value to be checkednotAllowedStrings- one or more strings which should not be included in value- Returns:
trueif string has no not allowed strings else false
-
isRepositoryNameValid
- Since:
- 1.9
-
isValid
Returnstrueif the object is valid.- Parameters:
validatable- object to be validated- Returns:
trueif object is valid
-