Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using javascript to validate a numeric condition

13 views
Skip to first unread message

The Doctor

unread,
Sep 11, 2023, 4:04:06 PM9/11/23
to
I am trying to using jquery.validate.js

to validate a total to be greater than 0?



Here is part of the code I am working with

<script>
$(document).ready(function(){
$("#blogm").validate({


rules:{
charge_total:{
required:true, }, ...

Is this correct?

--
Member - Liberal International This is doc...@nk.ca Ici doc...@nk.ca
Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b
Manitoba on 3 Oct 2023 vote Liberal! Beware https://mindspring.com

Michael Haufe (TNO)

unread,
Sep 11, 2023, 8:44:39 PM9/11/23
to
On Monday, September 11, 2023 at 3:04:06 PM UTC-5, The Doctor wrote:
> I am trying to using jquery.validate.js
>
> to validate a total to be greater than 0?
>
> [...]

Is there a reason why you can't just use the native form functionality?

<form id='blogm'>
<input name='charge_total' type='number' min='0' required>
<button>Submit</button>
</form>

The Doctor

unread,
Sep 12, 2023, 12:30:46 AM9/12/23
to
In article <46aa056d-9519-4a93...@googlegroups.com>,
iFWIW, it works!
0 new messages