|
@@ -924,6 +924,16 @@ func checkFHA(l Loan, b Borrower) error { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Loan option for veterans with no set rules |
|
|
|
|
|
func checkVA(l Loan, b Borrower) error { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Loan option for residents of rural areas with no set rules |
|
|
|
|
|
func checkUSDA(l Loan, b Borrower) error { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Should also check loan amount limit maybe with an API. |
|
|
// Should also check loan amount limit maybe with an API. |
|
|
func checkEstimate(e Estimate) error { |
|
|
func checkEstimate(e Estimate) error { |
|
|
if e.Property == "" { return errors.New("Empty property type") } |
|
|
if e.Property == "" { return errors.New("Empty property type") } |
|
@@ -960,9 +970,9 @@ func checkEstimate(e Estimate) error { |
|
|
case 2: |
|
|
case 2: |
|
|
err = checkFHA(l, e.Borrower) |
|
|
err = checkFHA(l, e.Borrower) |
|
|
case 3: |
|
|
case 3: |
|
|
err = checkConventional(l, e.Borrower) |
|
|
err = checkVA(l, e.Borrower) |
|
|
case 4: |
|
|
case 4: |
|
|
err = checkConventional(l, e.Borrower) |
|
|
err = checkUSDA(l, e.Borrower) |
|
|
default: |
|
|
default: |
|
|
err = errors.New("Invalid loan type") |
|
|
err = errors.New("Invalid loan type") |
|
|
} |
|
|
} |
|
|