Class: AlMail
Overview
メールアドレス入力ウィジェット
Instance Attribute Summary
Attributes inherited from AlText
Attributes inherited from AlWidget
#filter, #foreign, #hidden, #label, #message, #name, #required, #tag_attr, #tag_type, #value
Instance Method Summary collapse
-
#initialize(name, arg = {}) ⇒ AlMail
constructor
(AlMail) constructor.
Methods inherited from AlText
Methods inherited from AlWidget
#make_tag, #make_value, #set_attr, #set_value
Constructor Details
#initialize(name, arg = {}) ⇒ AlMail
(AlMail) constructor
1341 1342 1343 1344 1345 1346 1347 |
# File 'lib/al_form.rb', line 1341 def initialize( name, arg = {} ) part = %r([a-zA-Z0-9_\#!$%&`'*+\-{|}~^/=?\.]+) super( name, arg ) @filter = arg[:filter] || AlForm::FILTER_STRIP @validator = %r(\A#{part}@#{part}\z) end |