rocky
rocky

Reputation: 177

data-val value less than $1

<input data-val="true" data-val-number="The field Amount must be a number." id="Amount" type="text" value class="input-validation-error">

I have above HTML generated. It works well except if user is trying to enter less than $1. user types .72 in the text box then it gives an error The field Amount must be a number. if user is typing 0.72 then it works fine.

What could be a fix to this

Upvotes: 0

Views: 169

Answers (1)

zod
zod

Reputation: 12417

you did not say where and how you validate . anyway try this jquery function

.isNumeric()

http://api.jquery.com/jQuery.isNumeric/

Upvotes: 1

Related Questions