search

Home  >  Q&A  >  body text

php-laravel - The problem of comparing the size of two input values ​​in form validation in laravel

The problem is this. I now have two input boxes to input values. During verification, I need to compare the values ​​​​of these two input boxes. If the value passed in box A is greater than the value passed in box B, It returns an error and cannot pass. It seems that using Max:value or min:value does not work. I would like to ask how to compare such verification

黄舟黄舟2800 days ago556

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 16:58:38

    You can use js directly to capture input events, obtain values, compare, and output error messages;
    To be more secure, it is OK to set a judgment when submitting in the background.

    reply
    0
  • Cancelreply