Rule for a value less than an other

i have these rule:

rules() {
  return {
    val1: 'number',
    val2: 'number'

how can I add a rule so that val1 < val2 ?
tried val2: 'number|under:val2 but doesn’t work and no error shown

Hi @student

Have not tested, but seems like you had typo: val2: 'number|under:val2' should be val1: 'number|under:val2'

If this doesn’t fix it I’d go with extending validator myself: Extending validator doc