You are here

32 password_confirm(带确认的密码)

admin 的头像
Submitted by admin on 星期二, 2015-06-23 09:37

作者:老葛,北京亚艾元软件有限责任公司,http://www.yaiyuan.com

    该元素创建两个HTML密码字段,并附加一个验证器来检查两个密码是否匹配。

 

示例代码,来自(user.module):

 

$form['account']['pass'] = array(

'#type' => 'password_confirm',

'#size' => 25,

'#description' => t('Provide a password for the new account in both fields.'),

'#required' => TRUE,

); 

 

常用属性: #access、 #after_build、 #description、 #disabled、 #element_validate、 #field_prefix、 #field_suffix、 #parents、 #post_render、 #prefix、 #pre_render、 #process、 #required、 #size (默认为60)、 #states、 #suffix、 #theme、 #theme_wrappers、 #title、 #title_display、 #tree、 #type、 #weight


Drupal版本: