Registry / testing / ax5ui-formatter

ax5ui-formatter

JSON →
library1.4.126jsnpmunverified

ax5ui-formatter is a jQuery plugin that provides pre-defined formatting masks (money, date, phone, etc.) for input fields, part of the ax5ui UI library. Version 1.4.126 is the latest stable release, with low release cadence. It depends on jQuery 1.x+ and ax5core. Unlike alternatives like Cleave.js or Inputmask, it integrates deeply with Bootstrap and ax5ui ecosystem, using data attributes for declarative binding.

npm install ax5ui-formatter
INSTALL
IMPORT
SIG · AX5UI-FORMATTER
A
ax5ui-formatter
testingjavascriptv1.4.126
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ax5formatter (jQuery plugin)
$('[data-ax5formatter]').ax5formatter();
ax5formatter();
The plugin is invoked on a jQuery collection. It is not a standalone module function.
Default (via <script> tag)
<script src="https://cdn.rawgit.com/ax5ui/ax5ui-formatter/master/dist/ax5formatter.min.js"></script>
import ax5formatter from 'ax5ui-formatter';
This package is not distributed as an ES module. Use script tags or CommonJS require in a bundler.
CommonJS require
require('ax5ui-formatter');
import { ax5formatter } from 'ax5ui-formatter';
The package provides no named exports; require() attaches the plugin to jQuery.

Shows how to set up ax5ui-formatter with Bootstrap, applying money and date formatting via data attributes.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" /> <!-- OR use ax5formatter.css if needed: <link rel="stylesheet" href="https://cdn.rawgit.com/ax5ui/ax5ui-formatter/master/dist/ax5formatter.css" /> --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.rawgit.com/ax5ui/ax5core/master/dist/ax5core.min.js"></script> <script src="https://cdn.rawgit.com/ax5ui/ax5ui-formatter/master/dist/ax5formatter.min.js"></script> <div class="container"> <div class="form-group"> <label>Money</label> <input type="text" class="form-control" data-ax5formatter="money" placeholder="0,000.00"> </div> <div class="form-group"> <label>Date</label> <input type="text" class="form-control" data-ax5formatter="date" placeholder="yyyy-mm-dd"> </div> </div> <script> $('[data-ax5formatter]').ax5formatter(); </script>
Debug
Known issues
gotchaThe plugin expects Bootstrap's CSS and HTML structure (input-group, form-control). Without Bootstrap, formatting may still work but layout may break.
fix
Include Bootstrap CSS or ensure your own styling for input groups.
affects: >=1.0
deprecatedThe package uses rawgit CDN, which is now officially deprecated and will be shut down. CDN links may stop working.
fix
Switch to other CDN like jsDelivr (https://cdn.jsdelivr.net/npm/ax5ui-formatter@1.4.126/dist/ax5formatter.min.js) or host the files yourself.
affects: >=1.0
gotchaThe plugin does not support ES module imports (import/export). Trying to import in a bundler like webpack will fail without proper configuration.
fix
Use script tags or configure bundler to handle CommonJS. For webpack: use webpack.ProvidePlugin for jQuery if needed.
affects: >=1.0
gotchaax5ui-formatter requires ax5core to be loaded before it. Missing ax5core will cause '$ is not defined' or similar errors.
fix
Ensure ax5core.min.js is included before ax5formatter.min.js.
affects: >=1.0
Errors
Common errors & fixes
Uncaught TypeError: $(...).ax5formatter is not a function
jQuery or ax5ui-formatter script not loaded correctly, or loaded in wrong order.
fix
Ensure jQuery is loaded first, then ax5core, then ax5formatter. Verify file paths and script tags.
ReferenceError: ax5 is not defined
ax5core is not loaded before ax5ui-formatter.
fix
Include <script src="ax5core.min.js"></script> before ax5formatter.min.js.
Cannot read property 'money' of undefined
Invalid format value in data-ax5formatter attribute or missing ax5core.
fix
Use a supported format (money, date, phone, etc.). Ensure ax5core is loaded.
Upgrade
Version history
1.4.126latest on npm
Audit
Dependencies
jqueryrequiredRequired for DOM manipulation and plugin registration
ax5corerequiredCore utility library for ax5ui plugins
bootstrapoptionalCSS framework for styling input groups
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
ax5ui-formatter — npm install ax5ui-formatter · libregistry