[prev in list] [next in list] [prev in thread] [next in thread]
List: webmin-devel
Subject: Re: [webmin-devel] Input validation
From: Danny Sauer <danny () dannysauer ! com>
Date: 2013-04-12 21:17:13
Message-ID: c7765c7c-e752-4697-ba9a-bc3f7a974c43 () email ! android ! com
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
If you do an <input type=number>, most newer browsers will restrict values to \
numeric, mobile browsers will pop up a numeric keypad, and old browsers will just do \
a normal text field because they don't recognize that type (and the default is plain \
text). You can't rely on that (always verify on the server side), and the ui_lib \
doesn't create these for you, but giving some feedback on the client side this way is \
almost free, so it's basically win-win. :)
Jamie Cameron <jcameron@webmin.com> wrote:
>
> Usually I would do this on the server side, with code like :
> if ($in{'fieldname'} !~ /[0-9]/) {
> error("You must enter a digit");
> }
>
> On 12/Apr/2013 06:02 Emma wasanzy <emma.wasanzy@gmail.com> wrote ..
>
> Hello,
> Please how can I force a user to input a digit in a textbox? Or how to
> validate the input to make sure is a digit?
> Cheers!
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for
> building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
>
> ------------------------------------------------------------------------
>
> -
> Forwarded by the Webmin development list at webmin-devel@webmin.com
> To remove yourself from this list, go to
> http://lists.sourceforge.net/lists/listinfo/webadmin-devel
- --
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.0.8
iGoEAREIACoFAlFoedkjHERhbm55IFNhdWVyIDxkYW5ueUBkYW5ueXNhdWVyLmNv
bT4ACgkQvtwZjjd2PN+qNQCeOhLlAopjjQNs55wrjLsl5JjaBEwAn36YW2iDFnEC
aep9QjSMFdgx0EZN
=439C
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
-
Forwarded by the Webmin development list at webmin-devel@webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic