diazvictor / lmask

Small input mask library for Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lmask

Small library of input masks for lua inspired by v-mask.

Dependencies

Initialization

local lmask = require("lmask")

Usage

Phone number

local phoneNumber = lmask('(####)-##-##-###', '04128692598')
-- (0412)-86-92-598

Passport document

local passportDocument = lmask('A-########-#', 'J234176882')
-- J-23417688-2

Here is a list placeholders you can utilize by default:

Placeholder Format
# Number (0-9)
A Letter in any case (a-z,A-Z)

License

lmask is available under the MIT license. Details can be found in the LICENSE file.

About

Small input mask library for Lua

License:MIT License


Languages

Language:Lua 100.0%