ValidatorHint | CoUI

ValidatorHint

폼 입력 아래 표시하는 유효성 메시지 (심각도 아이콘 포함)

ValidatorHint#

폼 입력 아래에 유효성 메시지(error / warning / info / success)를 선두 심각도 아이콘과 함께 표시합니다. visiblefalse 면 0 크기로 접히고, type 이 per-type 강조 색(아이콘·메시지 모두)과 기본 선두 아이콘을 결정합니다. Flutter / Web 1:1 동일 API 입니다.

Live Preview#

Web

비밀번호는 8자 이상이어야 합니다.

Flutter
Loading Flutter...
class ValidatorHintDefaultExample extends StatelessComponent {
  const ValidatorHintDefaultExample({super.key});

  @override
  Component build(BuildContext context) {
    return ValidatorHint(
      message: Text('비밀번호는 8자 이상이어야 합니다.'),
      type: CoreValidatorHintType.error,
    );
  }
}
class ValidatorHintDefaultExample extends StatelessWidget {
  const ValidatorHintDefaultExample({super.key});

  @override
  Widget build(BuildContext context) {
    return ValidatorHint(
      message: const Text('비밀번호는 8자 이상이어야 합니다.'),
      type: CoreValidatorHintType.error,
    );
  }
}

사용법#

ValidatorHint(
  message: const Text('비밀번호는 8자 이상이어야 합니다.'),
  type: CoreValidatorHintType.error,
)

Props#

파라미터타입기본값설명
message Widget / Component? required (Flutter) 유효성 메시지
type CoreValidatorHintType defaultType 심각도 ( error / warning / info / success ) — 강조 색·기본 아이콘 결정
visible bool true false 면 0 크기로 접힘
icon Widget / Component? null 커스텀 선두 아이콘 (기본: type 별 아이콘)
validatorHintStyle CoreValidatorHintStyle? null chrome / 타이포 단일 진입점