Page MenuHomePhabricator

Mandatory fields busted if any input type=checkboxes field is set to mandatory
Closed, ResolvedPublic

Description

Author: mitchell_neill

Description:
I've found another case that breaks the mandatory fields functionality. If you have input type=checkboxes and the field set mandatory then the form can be saved if any of the mandatory fields are left blank.

This can be seen at:
http://scratchpad.referata.com/wiki/Mandatory_Field_Test

The Name, Title and Mandatory Test Property are set to be mandatory. However, when you leave one or indeed all of them blank, the form can still be saved. If you remove the "mandatory" from

! Mandatory Test Property:

{{{fieldMandatory Test Propertyinput type=checkboxesmandatory}}}

Then the form cannot be saved if Name or Title are left blank.

So to sum up so far. Mandatory field functionality get broken if you specify mandatory on:

  1. Hidden fields (not especially a problem).
  2. Show on Select fields
  3. Input type=checkboxes fields

Version: unspecified
Severity: critical

Details

Reference
bz24827

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:59 PM
bzimport set Reference to bz24827.

mitchell_neill wrote:

Okay, found another instance that will break all mandatory fields. If
you set any multiple values field of type string to mandatory then all
mandatory fields stop working. I guess it's because multiple value
string fields default to checkboxes.

I believe this is now fixed in version 2.0 - setting to "fixed".