amber icon indicating copy to clipboard operation
amber copied to clipboard

Handle empty (auth) params

Open alliedarmour opened this issue 4 years ago • 1 comments

Description

Using the default generated Auth-Registration Controller, you get a 500 error if both fields are left blank. I thought this was fixed in #1085, but still happens for me.

Steps to Reproduce

  1. generate new amber app
  2. amber g auth User
  3. go to sign up page and leave the fields completely empty

Expected behavior: Error should be added to user.errors and shown to the user

Actual behavior: 500 error is thrown

Bildschirmfoto 2021-06-11 um 10 47 38

Reproduces how often: 100%

Versions

Crytal 1.0.0 Amber 0.36.0

alliedarmour avatar Jun 11 '21 08:06 alliedarmour

Update: Okay I found out that if you manually add true as 3rd parameter in validation it works. It should be written in the docs though :).

alliedarmour avatar Jun 11 '21 12:06 alliedarmour