You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2023. It is now read-only.
I'm adding Recaptcha support for Statamic's user registration form by listening to the 'user.registering' event. On failure, I return errors which are captured by the runRegisteringEvent() method which in turn passes the MessageBag back to the register() method... so far so good!
The registration form correctly stops further processing and returns back, however the errors aren't available inside {{ errors }}.
I'm adding Recaptcha support for Statamic's user registration form by listening to the
'user.registering'
event. On failure, I return errors which are captured by therunRegisteringEvent()
method which in turn passes the MessageBag back to theregister()
method... so far so good!The registration form correctly stops further processing and returns back, however the errors aren't available inside
{{ errors }}
.Solution:
The issue is line
178
of theUserListener
class:The
withErrors
method is missing the errors key:By adding this key (also used by the registration validator on line
168
), I'm able to correctly receive and render the error inside templates.The text was updated successfully, but these errors were encountered: