How to mask form inputs

Hi, is this possible to use jQuery Mask Plugin in zammad, if so how can i do this?
Are there any other options?

For example i want to mask TIN to be exactly 9 digits

class AssetModelModal extends App.ControllerModal
.
.
.
 @form = new App.ControllerForm(
        el: content.find('.js-form')
        model:
          configure_attributes: [
            { name: 'tin', display: __('tin'), tag: 'input', null: true, },
          ]
        params: @data
      )
.
.
.

Hi @xMikuzoo ,

not sure if that plugin is compatible with the zammad core. Sounds like a big task. Alternatively I only could think about some manual checks via JS and you could also think about a backend check to make this happen before creation:

config/initializers/tin_validate.rb

ActiveSupport::Reloader.to_prepare do
  require_dependency 'ticket'

  Ticket.class_eval do
    validates :tin, format: { with: /\A\d{9}\z/, message: "Field TIN needs to be exactly 9 digits." }
  end
end

(This example should work if you create an input attribute for the Ticket named tin)

This might be the easiest way, I guess.