Here it is:
<form id="signInForm">
<section id="signInSection">
<input class="large"
type="text"
name="username"
placeholder="Username"
autofocus
data-constraints="@Required"/><br>
<input class="large"
type="password"
name="password"
placeholder="Password"
data-constraints="@Required"><br>
<button id="signInBtn" class="small">Sign In</button><br>
<label><input type="checkbox"/>Remember me.</label>
<a href="#">Can't access my account.</a>
<img src="../images/cancel.jpg" alt="Cancel Sign In">
</section>
</form>
See attached screen shot also, which shows the elements array is empty.
//validation starts
regula.bind();
var validationResults = regula.validate();
for(var i = 0; i < validationResults.length; i++) {
var validationResult = validationResults[i];
//here we have to show the message as a placeholder in the corresponding input box.
//with the input box shadow in red color and message in red color.
alert(validationResult.toSource());
//$('#signInSection').find('input').first().attr('placeholder',validationResult.message);
//$('#signInSection').find('input').first().css('border-color', '#FF0000');
}