, another cool thing from @nghuuphuoc!

digits validator

Return true if the value contains only digits


Improve it on Github


Option HTML attribute Type Description
message data-bv-digits-message String The error message
When setting options via HTML attributes, remember to enable the validator by setting data-bv-digits="true".

Related validators

The following validators might be useful to you: