diff --git a/extopy-commons/src/commonMain/kotlin/me/nathanfallet/extopy/models/auth/RegisterCodePayload.kt b/extopy-commons/src/commonMain/kotlin/me/nathanfallet/extopy/models/auth/RegisterCodePayload.kt index 1aa7f7c..7630269 100644 --- a/extopy-commons/src/commonMain/kotlin/me/nathanfallet/extopy/models/auth/RegisterCodePayload.kt +++ b/extopy-commons/src/commonMain/kotlin/me/nathanfallet/extopy/models/auth/RegisterCodePayload.kt @@ -2,11 +2,15 @@ package me.nathanfallet.extopy.models.auth import kotlinx.datetime.LocalDate import kotlinx.serialization.Serializable +import me.nathanfallet.extopy.models.users.User +import me.nathanfallet.usecases.models.annotations.validators.StringPropertyValidator @Serializable data class RegisterCodePayload( val password: String, + @StringPropertyValidator(regex = User.USERNAME_REGEX, maxLength = 25) val username: String, + @StringPropertyValidator(maxLength = 40) val displayName: String, val birthdate: LocalDate, )