chore(form): disable no-answer option for m/apreq forms
This commit is contained in:
parent
1de1cdbfd4
commit
297b408e9c
@ -1667,7 +1667,8 @@ mpreq :: (RenderMessage site (ValueRequired site), HandlerSite m ~ site, MonadHa
|
||||
-- ^ Pseudo required
|
||||
--
|
||||
-- `FieldView` has `fvRequired` set to `True` and @FormSuccess Nothing@ is cast to `FormFailure`.
|
||||
-- Otherwise acts exactly like `mopt`.
|
||||
-- Otherwise acts exactly like `mopt` without a default value and like `mreq` with a given default value
|
||||
mpreq f fs mx@(Just _) = mreq f fs mx -- This shortcut hides the invalid no-answer option if a default is provided
|
||||
mpreq f fs@FieldSettings{..} mx = do
|
||||
mr <- getMessageRender
|
||||
(res, fv') <- mpreq' f fs $ Just <$> mx
|
||||
|
||||
Loading…
Reference in New Issue
Block a user