Practice · 2 of 3
Whole-Form Validation
Write validateForm(values) where values is an object of field→value. RETURN { valid, errors } where errors maps field→message using the same rules as validateField (reuse it!), and valid is true only when errors is empty. Both fields of a cross-field pair must agree: password and confirm must match when both are present.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Advanced Forms — Practice