liquid_feedback_frontend

changeset 1314:74ce9970605b

Allow empty optional registration fields
author bsw
date Wed Aug 01 17:26:16 2018 +0200 (2018-08-01)
parents 7cdc685bb7a6
children 4c6165d43981
files app/main/registration/_action/register.lua
line diff
     1.1 --- a/app/main/registration/_action/register.lua	Wed Aug 01 17:21:01 2018 +0200
     1.2 +++ b/app/main/registration/_action/register.lua	Wed Aug 01 17:26:16 2018 +0200
     1.3 @@ -138,7 +138,7 @@
     1.4      
     1.5    else
     1.6      local value = param.get("verification_data_" .. field.name)
     1.7 -    if not value or (#value < 1 and (not manual_verification or field.name ~= "mobile_phone")) then
     1.8 +    if not field.optional and (not value or (#value < 1 and (not manual_verification or field.name ~= "mobile_phone"))) then
     1.9        slot.put_into("self_registration__invalid_" .. field.name, "to_short")
    1.10        slot.select("error", function()
    1.11          ui.container{ content = _("Please enter: #{field_name}", { field_name = field.label }) }

Impressum / About Us