diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 6b3950c6e..0ff5e9c95 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -186,6 +186,10 @@ private dynamically_not_required << "net_income_frequency" end + if tenancy_type == "Fixed term – Secure" + dynamically_not_required << "fixed_term_tenancy" + end + required.delete_if { |key, _value| dynamically_not_required.include?(key) } end end diff --git a/docs/api/DLUHC-CORE-Data.v1.json b/docs/api/DLUHC-CORE-Data.v1.json index f50e096fb..64d5ca517 100644 --- a/docs/api/DLUHC-CORE-Data.v1.json +++ b/docs/api/DLUHC-CORE-Data.v1.json @@ -873,7 +873,8 @@ }, "fixed_term_tenancy": { "type": "string", - "minLength": 1 + "minLength": 1, + "pattern": "((?!1|0)([0-9][0-9]))+" }, "tenancy_type": { "type": "string",