Quantcast
Channel: Zammad - Community - Latest posts
Viewing all articles
Browse latest Browse all 6816

How to mask form inputs

$
0
0

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.


Viewing all articles
Browse latest Browse all 6816

Trending Articles