Using warning-level constraints provides several advantages:
- Soft validation - Users can proceed with warnings while being informed of potential issues
- Progressive validation - Start with warnings that can be upgraded to errors later
- Better UX - Different visual treatment for errors (blocking) vs warnings (advisory)
- Flexible workflows - Allow submission with warnings while maintaining data quality standards
In the examples above, warnings and errors display independently — warnings (yellow) and errors (red). By default, getErrors() only returns errors, while warnings are still shown in the UI. To include warnings in the validation result, pass an array of filters: ['error', 'warning']. Final validation behavior is left to the user's implementation.