강의

멘토링

커뮤니티

Inflearn Community Q&A

haebing03097803's profile image
haebing03097803

asked

Spring MVC Part 2 - Backend Web Development Utilization Technology

BindingResult1

th:field와 th:erroclass

Written on

·

361

0

안녕하세요

th:errorclass : th:field 에서 지정한 필드에 오류가 있으면 class 정보를 추가한다

pdf내용 중 한 문장인데요 . 이 의미가 th:field는 오류가 있다면 그 오류난 것을 알고 있어서 th:errorclass를통해 class정보를 추가한다는 의미 맞죠??

그리고

th:errors="*{itemName}"은

errors중에 해당 필드 에러가 있을때 즉 itemName필드에 에러가 발생했을때 수행된다 이느낌 맞나요?/

springmvc

Answer 1

0

안녕하세요. 박해빈님, 공식 서포터즈 OMG입니다.
.

th:field는 오류가 있다면 그 오류난 것을 알고 있어서 th:errorclass를통해 class정보를 추가한다는 의미 맞죠??

네 맞습니다.

th:errors="*{itemName}"은 errors중에 해당 필드 에러가 있을때 즉 itemName필드에 에러가 발생했을때 수행된다 이느낌 맞나요?

네 이해하신게 맞습니다 :)
.
감사합니다.

haebing03097803's profile image
haebing03097803

asked

Ask a question