Skip to content
  • Gregor Anzelj's avatar
    Bug 1667521: Make 'Registration reason' mandatory when 'Confirm registration' is turned on · d850130c
    Gregor Anzelj authored and Robert Lyon's avatar Robert Lyon committed
    We achieve this by having a new pieform rule called 'requiredby' where
    we can reference another field and when a certain value is set in that
    field it makes this field required.
    
    requiredby rule needs an array containing:
    - the 'reference', a string of the name of the related field within the same form
    - the 'required', an array containing the values of 'reference' element as keys
      and true/1 for value if this element is required.
    -- If the reference field returns true/false then required array would
       have either 'true' => 1 or 'false' => 1 depending on what setting
       is needed
    
    behatnotneeded
    
    Change-Id: I9bc5d15b4035d4a11b81b9355a32044c66ee2199
    d850130c