I have been using SpringFramework not so long. Clarify me please where from target object "Driver" is assigned to BindingResult in Controller. I highlighted it by red square in screen shot. I need to bind other object to validate it fields.
In the front side I use thymeleaf template
<form id="statusSheduleForm" class="form-horizontal" th:action="@{/driver/saveStatusSchedule}"
th:method="POST"
th:object="${driverHistory}">
<div class="form-group col-md-7">
<div class="input-group date">
<label class="validation-message" for="statusdatetimepicker1"
th:if="${#fields.hasErrors('startStatusDate')}"
th:errors="*{startStatusDate}"></label>
<input type="text" placeholder="Время начала" th:field="*{startStatusDate}"
id="statusdatetimepicker1"/>
<input type="text" placeholder="Время окончания" th:field="*{endStatusDate}"
id="statusdatetimepicker2"/>
<select id="status-select" required="required" th:field="*{driverStatus}">
<option th:each="item:${statuses}"
th:value="${item.id}"
th:text="${item.name}"></option>
</select>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Сохранить</button>
<a th:href="@{/driver/index}" class="btn btn-default">Закрыть</a>
</div>
</form>