This is a sample for a typical subscription form. This is a typical subscription form. To prevent the user from including spaces in their username, we can attach a filter to the field:
<input type="text" name="username" tmt:required="true" tmt:filters="nospaces" />
This sample shows the tmt:equalto attribute in action:
<input type="password" name="password1" id="password1" class="required" tmt:required="true" />
<input type="password" name="password2" id="password2" class="required" tmt:required="true" tmt:equalto="password1" tmt:message="Please insert two matching passwords" />
Note: The value of the tmt:equalto attribute must be the id of an existing field in the current document.