Victor Cardona
12/23/2020, 3:14 PMinternal companion object {
internal val validation = object {
val name_blank: String = "Presenter must have a name"
}
}
The problem I’m having is that the name_blank property is not visible anywhere.
Presenter.validation.name_blank // Error, name_blank not resolved
Milan Hruban
12/23/2020, 8:32 PMAny
, because you haven't declared any supertype). So the properties are not visible outside of the file.
https://kotlinlang.org/docs/object-declarations.html#object-declarationsVictor Cardona
12/23/2020, 11:01 PMinternal object Validator {
const val NAME_BLANK: String = "Presenter must have a name"
internal fun validateName(name: String): String {
notBlank(name, NAME_BLANK)
return name;
}
}