Umbraco:使用配置文件自定义成员类型



我正在使用如下配置文件创建成员类型:

  <membertype alias="custommember" name="Custom Member">
    <tab alias="general" name="General Details">
      <property alias="contactphone" name="Contact Phone Number" type="Umbraco.Textbox" datatype="nvarchar" description="Either Mobile or Landline. If a mobile is enters SMS notifications are provided"/>
      <property alias="emailaddress" name="Email Address" type="Umbraco.Textbox" datatype="nvarchar" description="The primary contact email address of the member" />
    </tab>

我正在尝试在电话和电子邮件地址中添加验证属性,知道我需要调用哪个属性吗?只允许使用电话号码和电子邮件:11xx@xx.com只允许使用此格式。

感谢

您可以直接在Umbraco 7中创建自定义成员类型(或编辑默认类型),而不必通过配置文件。Umbraco内部有一个验证字段和所有内容。

在Members下,右键单击Member Types,选择Create,然后瞧:-)

如果没有其他内容,当您在Umbraco内创建自定义成员类型并在其他地方使用这些更改时,您可能能够发现对配置文件进行了哪些更改(如果有的话,但我认为不再使用配置文件)。

最新更新