Occuring error "This field is required" before input field is filled out

Issue #2234 resolved
Sebastian Böttger created an issue

On the login page and the registration page form error (input required) will be shown although the form was not filled out by the user yet. Change the validators for involved input fields in the controllers.

Bildschirmfoto 2014-10-16 um 23.31.30.png

Comments (14)

  1. Robert Jäschke

    This is not as easy to solve as it seems. In particular, it's neither necessary nor sufficient to change the validators. The reason these errors appear is that for the controller it is impossible to disinguish whether the user first loaded the page or just submitted it without any forms filled out. A typical solution for that issue is to embedd a hidden form field and check whether it is contained in the request - upon the first visit of the page it will be not, else it will be.

  2. Daniel Zoller

    Can't we check this by the request method (GET is first request and POST is submit)? What do i miss?

  3. Daniel Zoller

    If we change the behavior we have to add indicators to required fields (we had these indicators in the old non Bootstrap layout)

  4. Robert Jäschke
    • Regarding GET vs. POST: we don't have this information in the command (and I think it does not belong there). Giving each controller a RequestLogic is also not so nice. But in principle I like the idea.
    • Indicators: true, they are important!
  5. Sebastian Böttger reporter

    It would be very nice when users get no error messages when they just want to register on BibSonomy! ;)

  6. Log in to comment