Companion

object Companion

Properties

Link copied to clipboard

DEFAULT_LANGUAGE default language used

Link copied to clipboard
const val EMAIL_MAX_LENGTH: Int = 75

EMAIL_MAX_LENGTH the max valid length for the email

Link copied to clipboard
private const val EMAIL_REGEX: String

EMAIL_REGEX regular expression to validate the emails value

Link copied to clipboard
private val emailValidator: Regex

emailValidator helper to validate the emails values

Link copied to clipboard

HOST_ADDRESS_KEY the key for the "host_address" field

Link copied to clipboard

LANGUAGES_SUPPORTED list of the supported languages

Link copied to clipboard

MAX_REVENUE_LABELS_NUMBER_LENGTH the max valid number of labels for revenue

Link copied to clipboard
const val NAME_MAX_LENGTH: Int = 20

NAME_MAX_LENGTH the max valid length for the username

Link copied to clipboard
const val PASSWORD_MAX_LENGTH: Int = 32

PASSWORD_MAX_LENGTH the max valid length for the password

Link copied to clipboard
const val PASSWORD_MIN_LENGTH: Int = 8

PASSWORD_MIN_LENGTH the min valid length for the password

Link copied to clipboard

REVENUE_DESCRIPTION_MAX_LENGTH the max valid length for the revenue description

Link copied to clipboard

REVENUE_TITLE_MAX_LENGTH the max valid length for the revenue title

Link copied to clipboard
const val SURNAME_MAX_LENGTH: Int = 30

SURNAME_MAX_LENGTH the max valid length for the surname

Link copied to clipboard
private const val URL_REGEX: String

URL_REGEX regular expression to validate the urls value

Link copied to clipboard
private val urlValidator: Regex

urlValidator helper to validate the urls values

Link copied to clipboard

WRONG_CURRENCY_MESSAGE error message used when the currency inserted is not valid

Link copied to clipboard

WRONG_EMAIL_MESSAGE error message used when the email inserted is not valid

Link copied to clipboard

WRONG_LANGUAGE_MESSAGE error message used when the language inserted is not valid

Link copied to clipboard

WRONG_NAME_MESSAGE error message used when the name inserted is not valid

Link copied to clipboard

WRONG_PASSWORD_MESSAGE error message used when the password inserted is not valid

Link copied to clipboard

WRONG_SURNAME_MESSAGE error message used when the surname inserted is not valid

Functions

Link copied to clipboard
fun isEmailValid(email: String?): Boolean

Method to validate an email

Link copied to clipboard
fun isHostValid(host: String?): Boolean

Method to validate a host

Link copied to clipboard
private fun isInputValid(field: String?): Boolean

Method to validate an input

Link copied to clipboard
fun isLanguageValid(language: String?): Boolean

Method to validate a language

Link copied to clipboard
fun isNameValid(name: String?): Boolean

Method to validate a name

Link copied to clipboard
fun isPasswordValid(password: String?): Boolean

Method to validate a password

Link copied to clipboard
fun isServerSecretValid(serverSecret: String?): Boolean

Method to validate a server secret

Link copied to clipboard
fun isSurnameValid(surname: String?): Boolean

Method to validate a surname