Class: AlMail

Inherits:
AlText show all
Defined in:
lib/al_form.rb

Overview

メールアドレス入力ウィジェット

Instance Attribute Summary

Attributes inherited from AlText

#max, #min, #validator

Attributes inherited from AlWidget

#filter, #foreign, #hidden, #label, #message, #name, #required, #tag_attr, #value

Instance Method Summary (collapse)

Methods inherited from AlText

#make_tag, #set_value, #validate

Methods inherited from AlWidget

#make_value, #set_attr, #set_value

Constructor Details

- (AlMail) initialize(name, arg = {})

(AlMail) constractor

AlText#initialize argは親クラスを参照

Parameters:

  • name (String)

    ウィジェット識別名 英文字を推奨

  • arg (Hash) (defaults to: {})

    引数ハッシュ

See Also:



1320
1321
1322
1323
1324
1325
1326
# File 'lib/al_form.rb', line 1320

def initialize( name, arg = {} )
  part = %r([a-zA-Z0-9_\#!$%&`'*+\-{|}~^/=?\.]+)

  super( name, arg )
  @filter = 'value.strip'
  @validator = %r(\A#{part}@#{part}\z)
end