I need to make sure that only numbers between 5,000 and 50,000 can be entered. I'm currently using the following code,
rules: {
required: value => !!value || 'Required.',
loanMin: value => value <= 5000 || 'Loan should be above £5000',
loanMax: value => value >= 50000 || 'Max should not be above £50,000',
}
With the rules applied to the field as follows:
<v-text-field
height="5"
:rules="[rules.loanMin, rules.loanMaxMax, rules.required]"
editable
v-model="sliderLoan"
@change="principleLogger(sliderLoan)"
persistent-hint
outline
label="Loan Amount"
type="number"
></v-text-field>
How to apply multiple rules to one field?