igorescobar / jQuery-Mask-Plugin

A jQuery Plugin to make masks on form fields and HTML elements.
http://igorescobar.github.io/jQuery-Mask-Plugin/
Other
4.77k stars 1.42k forks source link

Possiblity to mask only letters in an input field. #745

Closed mikelounge closed 4 years ago

mikelounge commented 4 years ago

Device

desktop pc, windows 10

Browser (and version)?

chrome (latest)

Describe de problem depth:

i'd like to use a custom mask like this one: pattern="[A-Z a-z]{100}"

This way it would be possible to get on some input fields only letters and no numbers, but it could be 100 chars long. in the current situation i would need to add something like that. repeat A up to 100 Chars..

jQuery('input#myfield').mask('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', {'translation': { A: {pattern: /[A-Z a-z]/} }

is that possible?

mikelounge commented 4 years ago

as I need this for a client.. i will pay 20$ for a fix. who can do it?

igorescobar commented 4 years ago
// https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html -> Recursive digits
$('#text-field').mask('Z', {
    translation: {
        'Z': {
            pattern: /([A-Za-z])/, recursive: true
        }
    }
});

Working example: http://jsfiddle.net/fLry93c5/

mikelounge commented 4 years ago

Hi,

thanks a lot.. this is what recursive means in that case, great 😉 but i do stand to my word, where should i send the 20$ ? paypal mail or donation function from github ?

regards, michael

Freundliche Grüsse,

LOUNGE IT GmbH Michael MARTIN Geschäftsleitung https://lounge-it.comhttps://lounge-it.com/

Direkt: +41 56 511 29 33 Zentrale: +41 56 511 21 10

NEU können auch Office 365 Produkte direkt über uns bezogen werden. Fragen Sie uns für einen Full Service.

Weiterempfehlen lohnt sich! Verdienen Sie Provisionen in Höhe von CHF 30/60/90 und mehr je vermitteltes Hosting.

Von: Igor Escobar notifications@github.com Gesendet: Montag, 27. April 2020 12:41 An: igorescobar/jQuery-Mask-Plugin jQuery-Mask-Plugin@noreply.github.com Cc: Michael Martin michael@lounge-it.com; Author author@noreply.github.com Betreff: Re: [igorescobar/jQuery-Mask-Plugin] Possiblity to mask only letters in an input field. (#745)

// https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html -> Recursive digits

$('#text-field').mask('Z', {

translation: {

    'Z': {

        pattern: /([A-Za-z])/, recursive: true

    }

}

});

Working example: http://jsfiddle.net/fLry93c5/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/igorescobar/jQuery-Mask-Plugin/issues/745#issuecomment-619895797, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOV2QQ4WTMKJBJILOODS343ROVOLDANCNFSM4MH6TF5Q.

igorescobar commented 4 years ago

You can use the donate functionality on the plugin's webpage.

Cheers!

On Mon, Apr 27, 2020, 12:17 Michael Martin notifications@github.com wrote:

Hi,

thanks a lot.. this is what recursive means in that case, great 😉 but i do stand to my word, where should i send the 20$ ? paypal mail or donation function from github ?

regards, michael

Freundliche Grüsse,

LOUNGE IT GmbH Michael MARTIN Geschäftsleitung https://lounge-it.comhttps://lounge-it.com/

Direkt: +41 56 511 29 33 Zentrale: +41 56 511 21 10

NEU können auch Office 365 Produkte direkt über uns bezogen werden. Fragen Sie uns für einen Full Service.

Weiterempfehlen lohnt sich! Verdienen Sie Provisionen in Höhe von CHF 30/60/90 und mehr je vermitteltes Hosting.

Von: Igor Escobar notifications@github.com Gesendet: Montag, 27. April 2020 12:41 An: igorescobar/jQuery-Mask-Plugin jQuery-Mask-Plugin@noreply.github.com

Cc: Michael Martin michael@lounge-it.com; Author < author@noreply.github.com> Betreff: Re: [igorescobar/jQuery-Mask-Plugin] Possiblity to mask only letters in an input field. (#745)

// https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html -> Recursive digits

$('#text-field').mask('Z', {

translation: {

'Z': {

pattern: /([A-Za-z])/, recursive: true

}

}

});

Working example: http://jsfiddle.net/fLry93c5/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/igorescobar/jQuery-Mask-Plugin/issues/745#issuecomment-619895797>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AOV2QQ4WTMKJBJILOODS343ROVOLDANCNFSM4MH6TF5Q>.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/igorescobar/jQuery-Mask-Plugin/issues/745#issuecomment-619915486, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF3YBXOKOUSQR22XQ7Q7LROVSTNANCNFSM4MH6TF5Q .