Pular para o conteúdo principal

Validations

The template includes a built-in validation system that controls which verifications users must complete before navigating or performing actions (deposit, withdraw, play casino, etc.).

How it works

The brand configuration (features.authValidation) defines which validation modules are active for each context. The system evaluates the user's profile data against these modules and shows the appropriate modal when something is pending.

Two display modes

ModeWhen it appearsCan be closed?
Blocker overlayGlobal/regulatory/forced validations pendingNo (anti-tamper protection)
Steps modalContext-specific validations (deposit, withdraw, etc.)Yes (click outside or X button)

Available modules

ModuleWhat it verifies
emailEmail address verified via OTP code
phone / smsPhone number verified via SMS code
addressFull address (zipcode, street, city, state)
docsPersonal documents (CPF, birth date, nationality)
kycIdentity verification (selfie + documents)
passwordStrong password confirmation
user_limitsResponsible gaming limits (time + loss)
termsTerms and conditions accepted
gpsGeolocation permission granted
bank_accountBank account registered

Brand configuration

The validation modules for each context come from the brand API (features.authValidation). Example structure:

{
"global": {
"active": true,
"modules": ["user_limits", "address"],
"frequent": false,
"minValue": null,
"device": null
},
"deposit": {
"active": true,
"modules": ["email", "phone", "address", "kyc"],
"frequent": false,
"minValue": null,
"device": null
},
"withdraw": {
"active": true,
"modules": ["password"],
"frequent": true,
"minValue": 1,
"device": null
}
}

Configuration fields

FieldDescription
activeWhether this context's validations are enabled
modulesList of module IDs to validate
frequentIf true, modules are re-validated every time (e.g., password on each withdrawal)
minValueMinimum amount (in cents) to trigger validation. null = always
deviceDevice filter: null (all), "desktop", "mobile", "desktop_mobile"

Customizing labels and messages

Fork owners can customize the text shown in validation modals by editing:

  • app/components/validation/constants.ts — module labels and context messages
  • app/components/validation/ui/StepCarousel.tsx — module icons and labels in the step carousel

Theming

All validation modals use the auth.* color tokens from theme.config.ts. Changing the auth section colors will automatically update the validation modals.

See Theming for details on available color tokens.