Browse Source

validat unitletas

pull/171/head
Matthew Phelan 3 years ago
parent
commit
c6407d7da8
  1. 6
      app/models/validations/property_validations.rb

6
app/models/validations/property_validations.rb

@ -13,4 +13,10 @@ module Validations::PropertyValidations
record.errors.add :la, "Local authority has to be in London"
end
end
def validate_unitletas(record)
if record.unitletas.present? && (record.rsnvac == "First let of newbuild property" || record.rsnvac == "First let of conversion/rehabilitation/acquired property" || record.rsnvac == "First let of leased property")
record.errors.add :unitletas, "Can not be completed if it is the first let of the property"
end
end
end

Loading…
Cancel
Save