question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

simple-captcha validation error is not shown

See original GitHub issue

Hello,

When using a CaptchaField from simple-captcha module with crispy-forms, if I leave the field empty, or provide an invalid response, no error is displayed. If I disable crispy-forms, it works.

I looked into the generated HTML and found the entry:

<span id="error_1_id_captcha" class="invalid-feedback"><strong>Invalid response</strong</span>

The problem is, this CSS class has a “display: none” prop… So I overloaded my global CSS with the following:

/* Workaround a bug in crispy-forms not showing validation error from simple-captcha */
.invalid-feedback {
    display: block;
}

And the validation error is now displayed successfully.

Best regards, Adam.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
patagoniapycommented, Apr 21, 2020

I want to bump this up as well. Using django-captcha with crispy-forms, there is no error shown and therefore users can still press submit without knowing there is an error and their form won’t actually be submitted.

0reactions
patagoniapycommented, Apr 23, 2020

Were you using Google reCAPTCHA? Also, would it allow you to still submit? I tried looking through the HTML but I see no errors being raised. I added the CSS you added as well, and no luck…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rails simple-captcha validation never works? Even when correct
I have implemented simple-captcha2 into my application but I always get an error saying the captcha did not match the image even when...
Read more >
Really Simple Captcha does always validate - WordPress.org
There is a small bug in the CF7 plugin, but its not the reason why it fails to validated correctly. The error was...
Read more >
MVC Captcha and Text Fields are not showing validation error ...
Feather Form fields (e.g. MVC Captcha and Text field) are not showing validation error message when entering incorrect value.
Read more >
Using django-simple-captcha - Read the Docs
If the user didn't provide a valid response to the CAPTCHA challenge, the form will raise a ValidationError and display an error message...
Read more >
WP_Members_Captcha - RocketGeek
Really Simple CAPTCHA does not use an API key for display or validation, so omit the second argument of the method. Changelog. Introduced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found