RefyInputValidator

open class RefyInputValidator : InputValidator

The RefyInputValidator class is useful to validate the inputs

Author

N7ghtm4r3 - Tecknobit

See also

InputValidator

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val emailValidator: EmailValidator
Link copied to clipboard
private val HEX_COLOR_PATTERN: String = "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$"
HEX_COLOR_PATTERN the patter for a valid hex code of a color
Link copied to clipboard
val HOST_ADDRESS_KEY: String = "host_address"
Link copied to clipboard
Link copied to clipboard
MAX_DESCRIPTION_LENGTH the max valid length for the description field
Link copied to clipboard
Link copied to clipboard
MAX_TAG_NAME_LENGTH the max valid length for the tag name
Link copied to clipboard
MAX_TITLE_LENGTH the max valid length for the title
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val pattern: Pattern
pattern the HEX_COLOR_PATTERN validator
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val urlValidator: UrlValidator
Link copied to clipboard
val WRONG_CURRENCY_MESSAGE: String = "wrong_currency_key"
Link copied to clipboard
val WRONG_EMAIL_MESSAGE: String = "wrong_email_key"
Link copied to clipboard
val WRONG_LANGUAGE_MESSAGE: String = "wrong_language_key"
Link copied to clipboard
val WRONG_NAME_MESSAGE: String = "wrong_name_key"
Link copied to clipboard
val WRONG_PASSWORD_MESSAGE: String = "wrong_password_key"
Link copied to clipboard
val WRONG_SURNAME_MESSAGE: String = "wrong_surname_key"
Link copied to clipboard
val WRONG_TAG_NAME_MESSAGE: String = "wrong_tag_name_key"
WRONG_TAG_NAME message to use when the tag name of the user is not valid

Functions

Link copied to clipboard
private open fun isCollectionColorValid(collectionColor: String): Boolean
Method to validate a collection color
Link copied to clipboard
open fun isCollectionPayloadValid(color: String, title: String, description: String, links: List<String>): Boolean
Method to validate a payload of collection
Link copied to clipboard
private open fun isCustomLinkMapValid(map: Map<String, Any>): Boolean
Method to check whether a map instance is valid
Link copied to clipboard
open fun isCustomLinkPayloadValid(title: String, description: String, resources: Map<String, Any>, fields: Map<String, Any>): Boolean
Method to validate a payload of custom link
Link copied to clipboard
open fun isDescriptionValid(description: String): Boolean
Method to validate a description
Link copied to clipboard
open fun isEmailValid(email: String): Boolean
Link copied to clipboard
open fun isHostValid(host: String): Boolean
Link copied to clipboard
protected open fun isInputValid(field: String): Boolean
Link copied to clipboard
open fun isLanguageValid(language: String): Boolean
Link copied to clipboard
open fun isLinkPayloadValid(description: String, referenceLink: String): Boolean
Method to validate a payload of link
Link copied to clipboard
open fun isLinkResourceValid(linkResource: String): Boolean
Method to validate a link resource (url)
Link copied to clipboard
open fun isNameValid(name: String): Boolean
Link copied to clipboard
open fun isPasswordValid(password: String): Boolean
Link copied to clipboard
open fun isServerSecretValid(serverSecret: String): Boolean
Link copied to clipboard
open fun isSurnameValid(surname: String): Boolean
Link copied to clipboard
open fun isTagNameValid(tagName: String): Boolean
Method to validate a tag name
Link copied to clipboard
open fun isTitleValid(title: String): Boolean
Method to validate a title