First you have to include the js and css files for the spry framework. In this example taken from the spry demos we have two files. Both are designed for text fields.
<link href=”../../widgets/textfieldvalidation/SpryValidationTextField.css” rel=”stylesheet” type=”text/css”>
<script type=”text/javascript” src=”../../widgets/textfieldvalidation/SpryValidationTextField.js”>
The actual form field will be wrapped in a div or span tag with an id. Any [...]