Skip to content

Events

Full reference for VueClientRecaptcha component events.

EventPayloadDescription
isValidbooleanEmitted when validation state changes
update:validbooleanv-model:valid sync (internal)
getCodestringEmitted with captcha code on generate/refresh
update:modelValuestringv-model sync (internal)
refreshstringEmitted when captcha is regenerated
readyEmitted when canvas is ready
errorunknownEmitted on canvas/context failure

Usage Examples

Listen to validation

vue
<VueClientRecaptcha
  v-model="input"
  v-model:valid="isValid"
  @isValid="(valid) => console.log('Valid:', valid)"
/>

Get captcha code (e.g. for debugging)

vue
<VueClientRecaptcha
  v-model="input"
  @getCode="(code) => console.log('Code:', code)"
/>

Handle refresh

vue
<VueClientRecaptcha
  v-model="input"
  @refresh="(code) => console.log('New code:', code)"
/>

Handle ready and error

vue
<VueClientRecaptcha
  v-model="input"
  @ready="() => console.log('Canvas ready')"
  @error="(err) => console.error('Captcha error:', err)"
/>