Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
org.webjars.bower:angular-input-masks
Advanced tools
Opinionated angular input masks. Provides ready to use masks with little (br/inscricao-estadual) to no configuration (number, cnpj, etc).
With Bower:
bower install --save angular-input-masks
With npm:
npm install --save angular-input-masks
angular-input-masks-standalone.min.js
script in your page. For example:<script src="angular-input-masks-standalone.min.js"></script>
Obs: for npm the build scripts are available inside releases
folder.
ui.utils.masks
in your angular app. For example:angular.module('app', ['ui.utils.masks']);
angular.module('demo', [require('angular-input-masks')]);
Some masks are internationalized, so you need to include the proper angular-locale in your app(see: https://docs.angularjs.org/guide/i18n).
<input type="text" name="field" ng-model="number" ui-number-mask>
<input type="text" name="field" ng-model="number" ui-number-mask="3">
ui-negative-number
attribute:<input type="text" name="field" ng-model="number" ui-number-mask="4" ui-negative-number>
min
, max
and ui-hide-group-sep
attributes.<input type="text" name="field" ng-model="number" ui-number-mask min="10.1" max="100.9">
<!-- Use 'ui-hide-group-sep' attribute if you don't want show the thousands separators-->
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
<input type="text" name="field" ng-model="percentage" ui-percentage-mask>
<input type="text" name="field" ng-model="percentage" ui-percentage-mask="4">
The $modelValue is the $viewValue / 100, so $viewValue - 100% = $modelValue - 1
You can use the same value in $modelValue and $viewValue using ui-percentage-value
:
<input type="text" name="field" ng-model="percentage" ui-percentage-mask ui-percentage-value>
Support to the min
, max
and ui-hide-group-sep
attributes.
Internationalized: Used the decimal separator and thousands separator defined in the client browser configuration.
The $modelValue is the $viewValue / 100, so $viewValue - 100% = $modelValue - 1
You can add ui-hide-space
attribute to hide space between [NUMBER] and %
<input type="text" name="field" ng-model="money" ui-money-mask>
<input type="text" name="field" ng-model="money" ui-money-mask="3">
Support to the min
, max
and ui-hide-group-sep
attributes.
Internationalized: Used the currency symbol, decimal separator and thousands separator defined in the client browser configuration.
You can add ui-hide-space
attribute to hide space between [Currency symbol] and [NUMBER]
<input type="text" name="field" ng-model="phoneNumber" ui-br-phone-number>
<input type="text" name="field" ng-model="cep" ui-br-cep-mask>
<input type="text" name="field" ng-model="initializedCpf" ui-br-cpf-mask>
<input type="text" name="field" ng-model="initializedCnpj" ui-br-cnpj-mask>
<input type="text" name="field" ng-model="initializedCpfCnpj1" ui-br-cpfcnpj-mask>
<select ng-init="ufs=['AC','AL','AM','TO']" ng-model="selectedUF" ng-options="uf for uf in ufs"></select>
<input type="text" name="field19" ng-model="ieField" ui-br-ie-mask='selectedUF'>
Support masks for all the 27 brazillian states.
Validations according to the Sintegra especification.
-Example:
<input type="text" name="field" ng-model="initializeTime" ui-time-mask>
short
attributes.<input type="text" name="field" ng-model="initializeTime" ui-time-mask="short">
-Example:
<input type="text" name="field" ng-model="birthDate" ui-date-mask>
<input type="text" name="field" ng-model="birthDate" ui-date-mask="DD-MM-YYYY">
parse
attribute. When the attribute is set to false
, the inputed value will be passed to the model as a string. Default value of the attribute is true
.<input type="text" name="field" ng-model="birthDate" ui-date-mask parse="false">
See more usage examples in the Demo page
If you are using bower or npm (without browserify):
If you are using npm with browserify:
require('angular-input-masks')
: provides all directivesrequire('angular-input-masks/br')
: only global and BR directivesrequire('angular-input-masks/us')
: only global and US directivesLooking for related filters? Take a look at angular-br-filters
npm install
gulp build
npm run test:unit
src/**/*.spec.js
npm run test:e2e
npm test
FAQs
WebJar for angular-input-masks
We found that org.webjars.bower:angular-input-masks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.