I've got input field and I want to check dot existence for value of price input field. The value will be look like this 12.00. Here is my code
<g:textField class="span3" id="price" name="price" required="" pattern="\d+(\.\d{2})?"/>
I write something like this \d+(\.\d{2})?, but received error. Any suggestions ?
try this
[0-9]+(\\.[0-9][0-9]?)?
<form>
<input type='number' pattern='[0-9]+(\\.[0-9][0-9]?)?' />
<button type='submit'>Check</button>
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With