Permalink
Browse files

Support decimals

  • Loading branch information...
1 parent 562ec87 commit c66a2725125e22e9b56848ea2f4eae9eb3279c88 @jolros committed Jun 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 web-app/js/application.js
@@ -40,7 +40,7 @@ $("#guessForm").submit(function(event) {
guess = $form.find( 'input[name="guess"]' ).val(),
url = $form.attr( 'action' );
- if (!/^\d+$/.test(guess)) {
+ if (! (/^\d+$/.test(guess) || /^((\d+(\.\d *)?)|((\d*\.)?\d+))$/.test(guess)) ){
return false;
}

0 comments on commit c66a272

Please sign in to comment.