My web application is built using spring mvc and currently I am validating it via jquery on frontend and spring-mvc on backend. The code for this is something like
<form:input path="defaultDate" size="20" />
<form:errors path="defaultDate" />
for each element I have to place the form:errors control. Now I want to move to angularjs but not sure how to validate the backend code. I just want to use the simple html template instead of jsp code and templates and I can validate it easily via angularjs... something like
<input ng-model="defaultDate" type="text" name="defaultDate" id="defaultDate" required />
<label ng-show="userForm.defaulteDate.$invalid" class="error">Please enter val</label>
but how to validate it on server side and place the error correctly?