🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #582

Expresion Reular III

#582
From: Pintamono
Date: Thu, 20 Dec 2007 21:09
25 lines
1533 bytes
Que tal...

Necesito validar que un campo de texto sea numerico y que en algunos casos 
sea un numero decimal

100000 o 1,3   debe ser "coma" el separador de decimales

Tengo esta validacion de pruebas

var Valor = /[\d]+\,{1}?[\d]+/
if (!Valor.test(obj.value))
  alert(obj.value);

si ingreso 3.3 me deberia mostrar el alert pero no pasa na

si ingreso 122,22 me muestra el alert pero con valor 0 en vez de 122,22

He revisado varias expresiones para lo mismo pero on he logrado lo que 
necesito...

alguien tiene una por ahi que sirva?

la idea es solamente ingresar valores numericos o decimales...

eso... gracias.
Technical Details
Message-ID: <055b49536855cb98027a93b0647842a1$1@usenet.no-ip.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,e5b3e30169acdb69,start
X-Google-Attributes: gid1593cb,public,usenet
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: pintamono@NoMandeWeas.kk (Pintamono)
Newsgroups: chile.comp.programacion
Subject: Expresion Reular III
Date: Thu, 20 Dec 2007 18:09:48 -0300
Organization: Usenet Chile.* http://usenet.no-ip.com
Lines: 26
Message-ID: <055b49536855cb98027a93b0647842a1$1@usenet.no-ip.com>
NNTP-Posting-Host: pc-146-86-104-200.cm.vtr.net
Mime-Version: 1.0
X-Trace: news.nivel5.cl 1198184979 29492 200.104.86.146 (20 Dec 2007 21:09:39 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Thu, 20 Dec 2007 21:09:39 +0000 (UTC)
User-Agent: NewsPortal/0.3X RCL MOD
X-Abuse: robertocl@gmail.com
X-HTTP-Posting-Host: kerberos.uno.cl