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, served by the API) 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.

This is API-driven, not fork-driven — you do not edit these rules in the template. To change which validations your brand requires, ask the platform team to update your brand settings.

Contexts

authValidation carries one entry per context: global, register, casino, sports, deposit, firstDeposit, withdraw, firstWithdraw, updateData, updateLimits.

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
phonePhone number verified via SMS code
addressFull address (zipcode, street, city, state)
docsPersonal documents (CPF, birth date, nationality)
full_nameFull name present on the profile
kycIdentity verification (selfie + documents)
passwordStrong password confirmation
user_limitsResponsible gaming limits (time + loss)
termsTerms and conditions accepted
gpsGeolocation permission granted
bank_accountBank account registered

These are the module names the SDK evaluates. Modules are presented to the user in a fixed priority order (KYC always before user_limits, because the API rejects a limits submission before KYC is validated).

observação

sms and document exist only as label aliases used by the UI — they are not module names you can put in the modules array. Use phone and docs.

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 defined by the brand API. null = all devices. The accepted non-null values are part of the backend contract — ask the platform team if you need to scope a validation to one device class

Customizing labels and messages

All the text in the validation modals comes from the validation i18n namespaceapp/components/validation/constants.ts holds no literal copy, only the translation keys (validation:module_labels.*, validation:context.*). Editing that file will not change any wording.

To reword anything, override the namespace:

// app/locales/overrides/<lang>/validation.json
{
"module_labels": {
"docs": "Seus documentos"
},
"context": {
"withdraw": "Confirme sua senha para sacar"
}
}

Only the keys you declare are replaced — everything else keeps the SDK value. See i18n for the full override precedence.

Icons (not text) live in app/components/validation/ui/StepCarousel.tsx.

Theming

All validation modals use the auth.* color tokens from app/config/theme/colors.ts. Changing the auth group updates the validation modals automatically — they share the tokens with the login and register modals.

See Theming for details on available color tokens.