Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nunca se debiera poder agregar caracteres inválidos #10

Open
bunzli opened this issue Apr 2, 2015 · 5 comments
Open

Nunca se debiera poder agregar caracteres inválidos #10

bunzli opened this issue Apr 2, 2015 · 5 comments

Comments

@bunzli
Copy link
Member

bunzli commented Apr 2, 2015

Ya sea on-blur o live, nunca se debiera dejar agregar caracteres que no sea [0..9], ".", "-"y "k"

@bunzli bunzli changed the title Siempre se debieran impedir agregar caracteres inválidos Nunca se debiera poder agregar caracteres inválidos Apr 2, 2015
@bunzli
Copy link
Member Author

bunzli commented Apr 2, 2015

@RikRed, @richardgarces podrían probar esto en safari por favor?

http://jsfiddle.net/vvvc3Lkn/

@richardgarces
Copy link

funciona bien en safari.

2015-04-02 14:37 GMT-03:00 Jaime Bunzli notifications@github.com:

@RikRed https://github.com/rikred, @richardgarces
https://github.com/richardgarces podrían probar esto en safari por
favor?

http://jsfiddle.net/vvvc3Lkn/


Reply to this email directly or view it on GitHub
#10 (comment).

Richard A. Garcés Riffo
http://www.flickr.com/rgarces

"Quien tiene un porqué para vivir podrá superar cualquier cómo" (Friedrich
Nietzsche)

@RikRed
Copy link

RikRed commented Apr 2, 2015

Funciona, pero al no ser live permite ingresar formatos invalidos de rut, ej: 1k4K.-6.K7.
En el modo Live sugiero tambien validar el valor contra la expresion regular del rut (^\d{1,3}(.?\d{3})*-?[Kk|\d]{1}$) para evitar cosas como la mencionada anteriormente.

@bunzli
Copy link
Member Author

bunzli commented Apr 2, 2015

@RikRed creo que lo que mencionas lo podrías comentar en otro issue.

@agustinf agustinf closed this as completed Apr 2, 2015
@agustinf agustinf reopened this Apr 2, 2015
@antidiestro
Copy link
Contributor

actualmente la propuesta de @bunzli está reemplazando todo el $viewValue cada vez que cambia el texto del input, lo que produce que el cursor de la caja de texto se mueva al final cuando se borra algún caracter que está al medio del string, o se intenta introducir un caracter no permitido.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants