requires

fun requires(field1: BlastField, field2: BlastField)

Tests a flag that requires another flag to ensure that either the first field is its default value, otherwise both fields are non-default.

If the first field is non-default and the second field is default, an error will be appended to this ErrorMap.

errs := ErrorMap()

inp_1 := {name: foo, isDefault: false}
inp_2 := {name: bar, isDefault: true}

errs.requires(inp_1, inp_2)

errs.toMap == {
foo: Requires bar
}