- <form id="placeBid" action="/add-new-bid/{{$product->id}}" method="Post">
- {!! csrf_field() !!}
- <input type="submit" id="bidSubmit" class="btn btn-success" value="Siūlyti kainą" style="float: right" />
-
- <div style="overflow: hidden; padding-right: .5em;">
- <input type="hidden" value="{{$product->bid_price}}" id="jsBidPrice">
- <input type="number" name="bid" class="minBid form-control" min="{{$product->bid_price}}" onkeyup="this.value = minmax(this.value, 0, 100)" placeholder="min. suma {{$product->bid_price}} €" style="width: 100%;" />
- </div>
- </form>
I want to check if user typed less than jsBidPrice. If it is then just return an alert. It works. But when I inspect field element and delete the "min" attribute from the input when I type 6 the ajax works and sents info to DB and I want to do that it should not work when the
minBid is not equal or more then
jsBidPrice. This is my if: