Skip to content

RyanBertrand/angular-money-directive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

"money" AngularJs Directive

This directive validates monetary inputs in "42.53" format (some additional work is needed for "32,00" Europoean formats). Note that this is not designed to work with currency symbols. It largely behaves like Angular's implementation of type="number".

It does:

  • format the input field and enforces 2 decimal places on blur
  • default to positive numbers. Set min=-Infinity to allow negative values
  • prevent entering non-numeric characters
  • prevent entering the minus sign when min >= 0

Usage:

input(
  money
  min=1
  max=100
)

About

AngularJS directive to validate monetary inputs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%