<?xml-stylesheet type="text/xsl" href="/xforms-tests/xsltforms/xsltforms.xsl"?>
<html xmlns:my="http://commerce.example.com/payment" xmlns:txs="http://sourceforge.net/projects/txs" xmlns="http://www.w3.org/1999/xhtml" xmlns:req="http://www.agencexml.com/requests" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <head>
        <title>5.2.7.b card-number datatype - credit card example</title>
        <link rel="stylesheet" href="../../../driverPages/forms/TestSuite11.css" type="text/css"/>
        <xforms:model>
	  	  <xforms:instance>
			<payment xmlns="" method="cc">
		  	  <number/>
			  <expiry/>
			</payment>
	  	  </xforms:instance>
	  	  <xforms:bind nodeset="number" type="xforms:card-number"/>
		</xforms:model>
    </head>
    <body>
        <xforms:group>
            <xforms:label class="title">5.2.7.b card-number datatype - credit card example</xforms:label>
        </xforms:group>
        <xforms:group>
            <xforms:label>
                When you activate the Valid card-number Test trigger below you must see the message 
				"You entered a valid card-number". 
            </xforms:label>
        </xforms:group>
        <xforms:group>
            <xforms:input ref="number">
                <xforms:label>ID card number : </xforms:label>
                <xforms:action ev:event="xforms-valid">
                    <xforms:message level="modal">You entered a valid card-number</xforms:message>
                </xforms:action>
                <xforms:action ev:event="xforms-invalid">
                    <xforms:message level="modal">Invalid ID number</xforms:message>
                </xforms:action>
            </xforms:input>
        </xforms:group>
        
        <xforms:trigger>
        	<xforms:label>Valid card-number Test</xforms:label>
    		<xforms:setvalue ref="number" ev:event="DOMActivate">4111111111111111</xforms:setvalue>
    	</xforms:trigger>
        
    </body>
</html>