表单验证
填错了立刻在框下红字说明错哪,别等点提交才弹窗;填对的框给绿勾。
请输入有效的邮箱地址
✓
实现提示词
Inline form validation: show a red error message under the field immediately on invalid input (e.g. bad email format), green check when valid. Never wait until submit to show errors in a popup.Inline validation with red messages under fields and a shake animation on error; a green check appears when the input becomes valid.设计规范条目
### Form Validation (#formvalid) Category: Forms Form validation: show red text under the field immediately on error—don't wait for submit; green check for valid fields. - Do: Inline form validation: show a red error message under the field immediately on invalid input (e.g. bad email format), green check when valid - Avoid: don't wait for submit - Avoid: Never wait until submit to show errors in a popup With motion: Inline validation with red messages under fields and a shake animation on error; a green check appears when the input becomes valid. Live demo: https://uidesignmd.com/guides/formvalid/