diff --git a/labs/behaviors/validators/text-field-validator.ts b/labs/behaviors/validators/text-field-validator.ts new file mode 100644 index 0000000000..256f04f55e --- /dev/null +++ b/labs/behaviors/validators/text-field-validator.ts @@ -0,0 +1,271 @@ +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {Validator} from './validator.js'; + +/** + * Constraint validation for a text field. + */ +export interface TextFieldState { + /** + * The input or textarea state to validate. + */ + state: InputState | TextAreaState; + + /** + * The `` or `