aryehraber / statamic-captcha

Statamic Addon that protects your Statamic forms using a Captcha service.
MIT License
11 stars 8 forks source link

Can't get error message to show #29

Closed twd3 closed 2 years ago

twd3 commented 2 years ago

When I leave the captcha unchecked the error never shows? All other validation errors show fine. Any ideas? Really appreciate everything!!!

{{ form:contact }}

    <label for="name">Full Name</label>
    <input id="name" name="name" type="text" placeholder="Name *" value="{{ old:name }}">    
    {{ error:name ensure_left="*" wrap="span.error" }}

    {{ captcha }}
    {{ if error:captcha }}{{ error:captcha }}{{ /if }}

    <button type="submit" name="submit_button"></button>

{{ /form:contact }}

My config:

<?php

return [
    'service' => 'Recaptcha', // options: Recaptcha / Hcaptcha
    'sitekey' => env('CAPTCHA_SITEKEY', 'xxx'),
    'secret' => env('CAPTCHA_SECRET', 'xxx'),
    'forms' => ['contact'],
    'error_message' => 'Captcha failed.',
    'disclaimer' => '',
    'invisible' => false,
    'hide_badge' => false,
    'enable_api_routes' => false,
    'user_registration' => true,
    'user_login' => true,
];

In composer.json: "aryehraber/statamic-captcha": "^1.5",

twd3 commented 2 years ago

Ah, nope. It was me hahaha.