Components that allow the use of input with specific formats such as date, currency, or phone number with automatic validation. 💖
-
Web Browser
- Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera]. -
Internet
- Because many use CDN and to make it easier to find solutions to all problems.
const { formatInput } = require('formatted-input-fields');
// Example usage
const formatted = formatInput('1234567890', 'XXX-XX-XXXX');
console.log(formatted); // Output: '123-45-6789'
- This package provides a function formatInput to format input based on the provided mask. The function takes two parameters: the input string and the mask string. The mask string specifies the desired format of the input. The function replaces 'X' characters in the mask with corresponding characters from the input string.
- The
formatInput
function returns the formatted input string according to the specified mask.
- v1.0.0 : 17 March 2024
- v1.0.1 : 18 March 2024
- v1.0.2 : 23 March 2024
- v5.0.0 : 31 March 2024
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
- Copyright © 2024 One Dionys
- One Dionys - Formatted Input Fields is an open source project licensed under the MIT license
Love One Dionys - Formatted Input Fields? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys