Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #41433 > unrolled thread

Using javascript to validate a numeric condition

Started bydoctor@doctor.nl2k.ab.ca (The Doctor)
First post2023-09-11 20:03 +0000
Last post2023-09-12 04:30 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.javascript


Contents

  Using javascript to validate a numeric condition doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-09-11 20:03 +0000
    Re: Using javascript to validate a numeric condition "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-09-11 17:44 -0700
      Re: Using javascript to validate a numeric condition doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-09-12 04:30 +0000

#41433 — Using javascript to validate a numeric condition

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2023-09-11 20:03 +0000
SubjectUsing javascript to validate a numeric condition
Message-ID<udnrrd$1d47$4@gallifrey.nk.ca>
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 doctor@nk.ca Ici doctor@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

[toc] | [next] | [standalone]


#41434

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2023-09-11 17:44 -0700
Message-ID<46aa056d-9519-4a93-bcc3-a342ba2e44fen@googlegroups.com>
In reply to#41433
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>

[toc] | [prev] | [next] | [standalone]


#41435

Fromdoctor@doctor.nl2k.ab.ca (The Doctor)
Date2023-09-12 04:30 +0000
Message-ID<udophc$26f$2@gallifrey.nk.ca>
In reply to#41434
In article <46aa056d-9519-4a93-bcc3-a342ba2e44fen@googlegroups.com>,
Michael Haufe (TNO) <tno@thenewobjective.com> wrote:
>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>

iFWIW, it works!
-- 
Member - Liberal International This is doctor@nk.ca Ici doctor@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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web