理解XForm——學習IBM DW的資料 (3)

來源:互聯網
上載者:User
1、XForm靈活的用戶端資料校正功能
資料驗證一般包括三種類型:
完整性(Completeness):使用者必須填充所有要求的欄位。有時候,某個欄位是否必須填充依賴於另一個欄位的值。比如,只有當使用者使用信用卡支付時才需要信用卡號。
資料類型(Data types): 數字必須是數字、日期必須是日期,依次類推。
合理性(Appropriateness):電話號碼應該只包含數字,或者還可以包含與區號有關的短線和括弧。郵遞區號必須有 5 個數字組成,還可以帶有短線和“加四”號碼。
XForm提供Model中資料節點的類型綁定機制,如:
<xforms:model id=“payinfo“>
<xforms:submission action="http://www.example.com/orderform.php"
method="post"/>
<xforms:instance xmlns="">
<paymentinfo>
<method></method>
<cardtype></cardtype>
<cardnumber></cardnumber>
<expdate></expdate>
</paymentinfo>
</xforms:instance>
<xforms:bind ref="paymentinfo" type="ccnumber"/>
<xsd:schema>
<xsd:simpleType name="ccnumber">
<xsd:restriction base="xsd:string">
<xsd:pattern value="d{14,18}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
</xforms:model>
2、強制輸入
...
</xsd:schema>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.