<div class="m-2">
    {{#if validation.valid }}
        <h4>Hello {{name}}. You will be {{nextage}} next year.</h4>
    {{/if }}
</div>
<div>
    <form id="age_form" action="/form" method="post">
        <div class="m-2">
            <label class="form-label">Name</label>
            <input name="name" class="form-control" value="{{name}}"/>
            <div class="text-danger" id="err_name_required"
                    style="{{ pass validation 'name' 'required' }}">
                Please enter your name
            </div>
            <div class="text-danger" id="err_name_minLength"
                    style="{{ pass validation 'name' 'minLength' }}">
                Enter at least 5 characters
            </div>            
        </div>
        <div class="m-2">
            <label class="form-label">Current Age</label>
            <input name="age" class="form-control" value="{{age}}" />
            <div class="text-danger" id="err_age_isInteger"
                    style="{{ pass validation 'age' 'isInteger' }}">
                Please enter your age in whole years
            </div>            
        </div>                   
        <div class="m-2">
            <button class="btn btn-primary">Submit</button>                                
        </div>
    </form>
</div>
