Download the PHP package sgu-infocom-official/inputmask_v3.3.11 without Composer

On this page you can find all versions of the php package sgu-infocom-official/inputmask_v3.3.11. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package inputmask_v3.3.11

Inputmask 3.x

Copyright (c) 2010 - 2017 Robin Herbots Licensed under the MIT license (http://opensource.org/licenses/mit-license.php)

NPM Version Dependency Status devDependency Status

Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.

An inputmask helps the user with the input by ensuring a predefined format. This can be useful for dates, numerics, phone numbers, ...

Highlights:

Demo page see http://robinherbots.github.io/Inputmask

donate

Setup

dependencyLibs

Inputmask can run against different javascript libraries.
You can choose between:

Classic web with <script> tag

Include the js-files which you can find in the dist folder.

If you want to include the Inputmask and all extensions. (with jQuery as dependencylib)

For individual extensions. (with jQuery as dependencylib)

For individual extensions. (with vanilla dependencylib)

If you like to automatically bind the inputmask to the inputs marked with the data-inputmask- ... attributes you may also want to include the inputmask.binding.js

webpack

Install the package

In your modules

If you want to include the Inputmask and all extensions.

For individual extensions.
Every extension exports the Inputmask, so you only need to import the extensions.
See example.

Selecting the dependencyLib

By default the vanilla dependencyLib is used. You can select another dependency by creating an alias in the webpack.config.

Usage

via Inputmask class

via jquery plugin

via data-inputmask attribute

Any option can also be passed through the use of a data attribute. Use data-inputmask-<the name of the option>="value"

Allowed HTML-elements

The allowed input types are defined in the supportsInputType option. Also see (input-type-ref)

Default masking definitions

There are more definitions defined within the extensions.
You can find info within the js-files or by further exploring the options.

Masking types

Static masks

These are the very basic of masking. The mask is defined and will not change during the input.

Optional masks

It is possible to define some parts in the mask as optional. This is done by using [ ].

Example:

This mask wil allow input like (99) 99999-9999 or (99) 9999-9999.

Input => 12123451234 mask => (12) 12345-1234 (trigger complete)
Input => 121234-1234 mask => (12) 1234-1234 (trigger complete)
Input => 1212341234 mask => (12) 12341-234_ (trigger incomplete)

skipOptionalPartCharacter

As an extra there is another configurable character which is used to skip an optional part in the mask.

Input => 121234 1234 mask => (12) 1234-1234 (trigger complete)

When clearMaskOnLostFocus: true is set in the options (default), the mask will clear out the optional part when it is not filled in and this only in case the optional part is at the end of the mask.

For example, given:

While the field has focus and is blank, users will see the full mask ___-___. When the required part of the mask is filled and the field loses focus, the user will see 123. When both the required and optional parts of the mask are filled out and the field loses focus, the user will see 123-ABC.

Optional masks with greedy false

When defining an optional mask together with the greedy: false option, the inputmask will show the smallest possible mask as input first.

The initial mask shown will be "_" instead of "_-____".

Dynamic masks

Dynamic masks can change during the input. To define a dynamic part use { }.

{n} => n repeats
{n,m} => from n to m repeats

Also {+} and {} is allowed. + start from 1 and start from 0.

Alternator masks

The alternator syntax is like an OR statement. The mask can be one of the 3 choices specified in the alternator.

To define an alternator use the |.
ex: "a|9" => a or 9
"(aaa)|(999)" => aaa or 999
"(aaa|999|9AA)" => aaa or 999 or 9AA

Also make sure to read about the keepStatic option.

or

Preprocessing masks

You can define the mask as a function which can allow to preprocess the resulting mask. Example sorting for multiple masks or retrieving mask definitions dynamically through ajax. The preprocessing fn should return a valid mask definition.

JIT Masking

Just in time masking. With the jitMasking option you can enable jit masking. The mask will only be visible for the user entered characters. Default: false

Value can be true or a threshold number or false.

Define custom definitions

You can define your own definitions to use in your mask.
Start by choosing a masksymbol.

validator(chrs, maskset, pos, strict, opts)

Next define your validator. The validator can be a regular expression or a function.

The return value of a validator can be true, false or a command object.

Options of the command object

cardinality

Cardinality specifies how many characters are represented and validated for the definition.

prevalidator(chrs, maskset, pos, strict, opts)

The prevalidator option is used to validate the characters before the definition cardinality is reached. (see 'j' example)

definitionSymbol

When you insert or delete characters, they are only shifted when the definition type is the same. This behavior can be overridden by giving a definitionSymbol. (see example x, y, z, which can be used for ip-address masking, the validation is different, but it is allowed to shift the characters between the definitions)

placeholder

Specify a placeholder for a definition. This can also be a function.

set defaults

Defaults can be set as below.

But if the property is defined within an alias you need to set it for the alias definition.

However, the preferred way to alter properties for an alias is by creating a new alias which inherits from the default alias definition.

Once defined, you can call the alias by:

All callbacks are implemented as options. This means that you can set general implementations for the callbacks by setting a default.

Methods:

mask(elems)

Create a mask for the input.

or

or

or

or

unmaskedvalue

Get the unmaskedvalue

or

Value unmasking

Unmask a given value against the mask.

remove

Remove the inputmask.

or

or

getemptymask

return the default (empty) mask value

hasMaskedValue

Check whether the returned value is masked or not; currently only works reliably when using jquery.val fn to retrieve the value

isComplete

Verify whether the current value is complete or not.

getmetadata

The metadata of the actual mask provided in the mask definitions can be obtained by calling getmetadata. If only a mask is provided the mask definition will be returned by the getmetadata.

setvalue

The setvalue functionality is to set a value to the inputmask like you would do with jQuery.val, BUT it will trigger the internal event used by the inputmask always, whatever the case. This is particular usefull when cloning an inputmask with jQuery.clone. Cloning an inputmask is not a fully functional clone. On the first event (mouseenter, focus, ...) the inputmask can detect if it where cloned an can reactivate the masking. However when setting the value with jQuery.val there is none of the events triggered in that case. The setvalue functionality does this for you.

option(options, noremask)

Get or set an option on an existing inputmask. The option method is intented for adding extra options like callbacks, etc at a later time to the mask.

When extra options are set the mask is automatically reapplied, unless you pas true for the noremask argument.

Set an option

format

Instead of masking an input element it is also possible to use the inputmask for formatting given values. Think of formatting values to show in jqGrid or on other elements then inputs.

isValid

Validate a given value against the mask.

Options:

placeholder

Change the mask placeholder. Default: "_"

Instead of "_", you can change the unfilled characters mask as you like, simply by adding the placeholder option.
For example, placeholder: " " will change the default autofill with empty values

or a multi-char placeholder

optionalmarker

Definition of the symbols used to indicate an optional part in the mask.

quantifiermarker

Definition of the symbols used to indicate a quantifier in the mask.

groupmarker

Definition of the symbols used to indicate a group in the mask.

alternatormarker

Definition of the symbols used to indicate an alternator part in the mask.

escapeChar

Definition of the symbols used to escape a part in the mask.

See escape special mask chars

mask

The mask to use.

oncomplete

Execute a function when the mask is completed

onincomplete

Execute a function when the mask is incomplete. Executes on blur.

oncleared

Execute a function when the mask is cleared.

repeat

Mask repeat function. Repeat the mask definition x-times.

greedy

Toggle to allocate as much possible or the opposite. Non-greedy repeat function.

With the non-greedy option set to false, you can specify * as repeat. This makes an endless repeat.

autoUnmask

Automatically unmask the value when retrieved.
Default: false.

When setting this option to true the plugin also expects the initial value from the server to be unmasked.

removeMaskOnSubmit

Remove the mask before submitting the form.
Default: false

clearMaskOnLostFocus

Remove the empty mask on blur or when not empty removes the optional trailing part Default: true

insertMode

Toggle to insert or overwrite input.
Default: true.
This option can be altered by pressing the Insert key.

clearIncomplete

Clear the incomplete input on blur

aliases

Definitions of aliases.

With an alias you can define a complex mask definition and call it by using an alias name. So this is mainly to simplify the use of your masks. Some aliases found in the extensions are: email, currency, decimal, integer, date, datetime, dd/mm/yyyy, etc.

First you have to create an alias definition. The alias definition can contain options for the mask, custom definitions, the mask to use etc.

When you pass in an alias, the alias is first resolved and then the other options are applied. So you can call an alias and pass another mask to be applied over the alias. This also means that you can write aliases which "inherit" from another alias.

Some examples can be found in jquery.inputmask.xxx.extensions.js

use:

or

You can also call an alias and extend it with some more options

or

alias

The alias to use.

onKeyDown

Callback to implement autocomplete on certain keys for example

Function arguments: event, buffer, caretPos, opts
Function return:

onBeforeMask

Executes before masking the initial value to allow preprocessing of the initial value.

Function arguments: initialValue, opts
Function return: processedValue

onBeforePaste

This callback allows for preprocessing the pasted value before actually handling the value for masking. This can be usefull for stripping away some characters before processing.

Function arguments: pastedValue, opts
Function return: processedValue

You can also disable pasting a value by returning false in the onBeforePaste call.

Default: Calls the onBeforeMask

onBeforeWrite

Executes before writing to the masked element

Use this to do some extra processing of the input. This can be usefull when implementing an alias, ex. decimal alias, autofill the digits when leaving the inputfield.

Function arguments: event, buffer, caretPos, opts
Function return: command object (see Define custom definitions)

onUnMask

Executes after unmasking to allow post-processing of the unmaskedvalue.

Function arguments: maskedValue, unmaskedValue
Function return: processedValue

showMaskOnFocus

Shows the mask when the input gets focus. (default = true)

To make sure no mask is visible on focus also set the showMaskOnHover to false. Otherwise hovering with the mouse will set the mask and will stay on focus.

showMaskOnHover

Shows the mask when hovering the mouse. (default = true)

onKeyValidation

Callback function is executed on every keyvalidation with the key & result as parameter.

skipOptionalPartCharacter

numericInput

Numeric input direction. Keeps the caret at the end.

rightAlign

Align the input to the right

By setting the rightAlign you can specify to right align an inputmask. This is only applied in combination op the numericInput option or the dir-attribute. Default is true.

undoOnEscape

Make escape behave like undo. (ctrl-Z)
Pressing escape reverts the value to the value before focus.
Default: true

radixPoint (numerics)

Define the radixpoint (decimal separator)
Default: ""

groupSeparator (numerics)

Define the groupseparator
Default: ""

keepStatic

Default: null (~false) Use in combination with the alternator syntax Try to keep the mask static while typing. Decisions to alter the mask will be postponed if possible.

ex. $(selector).inputmask({ mask: ["+55-99-9999-9999", "+55-99-99999-9999", ], keepStatic: true });

typing 1212345123 => should result in +55-12-1234-5123 type extra 4 => switch to +55-12-12345-1234

When passing multiple masks (an array of masks) keepStatic is automatically set to true unless explicitly set through the options.

positionCaretOnTab

When enabled the caret position is set after the latest valid position on TAB Default: true

tabThrough

Allows for tabbing through the different parts of the masked field.
Default: false

definitions

ignorables

isComplete

With this call-in (hook) you can override the default implementation of the isComplete function.
Args => buffer, opts Return => true|false

canClearPosition

Hook to alter the clear behavior in the stripValidPositions
Args => maskset, position, lastValidPosition, opts
Return => true|false

postValidation

Hook to postValidate the result from isValid. Usefull for validating the entry as a whole. Args => buffer, currentResult, opts
Return => true|false|command object

preValidation

Hook to preValidate the input. Useful for validating regardless the definition. Args => buffer, pos, char, isSelection, opts => return true/false/command object When return true, the normal validation kicks in, otherwise it is skipped.

staticDefinitionSymbol

The staticDefinitionSymbol option is used to indicate that the static entries in the mask can match a certain definition. Especially usefull with alternators so that static element in the mask can match another alternation.

In the example below we mark the spaces as a possible match for the "i" definition. By doing so the mask can alternate to the second mask even when we typed already "12 3".

nullable

Return nothing when the user hasn't entered anything. Default: true

noValuePatching

Disable value property patching
Default: false

positionCaretOnClick

Positioning of the caret on click. Options none, lvp (based on the last valid position (default), radixFocus (position caret to radixpoint on initial click) Default: "lvp"

casing

Apply casing at the mask-level. Options: null, "upper", "lower" or "title"
or callback args => elem, test, pos, validPositions return charValue

Default: null

inputmode

Default: "verbatim" Specify the inputmode - already in place for when browsers start to support them https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute

colorMask

Default: false Create a css styleable mask. Uses css classes: im-caret, im-static.

You need to include the inputmask.css in your page to use this option in full.

General

set a value and apply mask

this can be done with the traditional jquery.val function (all browsers) or JavaScript value property for browsers which implement lookupGetter or getOwnPropertyDescriptor

with the autoUnmaskoption you can change the return of $.fn.val (or value property) to unmaskedvalue or the maskedvalue

escape special mask chars

If you want a mask element to appear as a static element you can escape them by \

auto-casing inputmask

You can define within a definition to automatically apply some casing on the entry in an input by giving the casing.
Casing can be null, "upper", "lower" or "title".

Include jquery.inputmask.extensions.js for using the A and # definitions.

Supported markup options

RTL attribute

readonly attribute

disabled attribute

maxlength attribute

data-inputmask attribute

You can also apply an inputmask by using the data-inputmask attribute. In the attribute you specify the options wanted for the inputmask. This gets parsed with $.parseJSON (for the moment), so be sure to use a well-formed json-string without the {}.

data-inputmask-<option> attribute

All options can also be passed through data-attributes.

jQuery.clone

When cloning a inputmask, the inputmask reactivates on the first event (mouseenter, focus, ...) that happens to the input. If you want to set a value on the cloned inputmask and you want to directly reactivate the masking you have to use $(input).inputmask("setvalue", value)

jquery.inputmask extensions

date & datetime extensions

numeric extensions

phone extensions

other extensions


All versions of inputmask_v3.3.11 with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sgu-infocom-official/inputmask_v3.3.11 contains the following files

Loading the files please wait ....