RUBY: Numeric validation using regular expression


numeric_var  =~ /^[-+]?[0-9]*\.?[0-9]+$/

No comments:

Post a Comment