diff --git a/docs/resources/contributing.md b/docs/resources/contributing.md index 46ae689f2..f7e0f7d72 100644 --- a/docs/resources/contributing.md +++ b/docs/resources/contributing.md @@ -345,12 +345,10 @@ For non-dependencies, _the user_ should decide what gets registered, even if it ### Form Controls -Form controls should support submission and validation through the following conventions: +Form controls should support submission and validation through the following conventions by implementing the `ShoelaceFormControl` interface: -- All form controls must use `name`, `value`, and `disabled` properties in the same manner as `HTMLInputElement` -- All form controls must have a `setCustomValidity()` method so the user can set a custom validation message -- All form controls must have a `reportValidity()` method that report their validity during form submission -- All form controls must have an `invalid` property that reflects their validity +- All form controls must use `name`, `value`, `disabled`, etc. in the same manner as `HTMLInputElement` +- All form controls must implement `checkValidity()`, `reportValidity()`, `setCustomValidity()`, etc. for validation - All form controls should mirror their native validation attributes such as `required`, `pattern`, `minlength`, `maxlength`, etc. when possible - All form controls must be tested to work with the standard `