better description of input validation attributes

Closes https://codeberg.org/forgejo/website/issues/168
This commit is contained in:
Caesar Schinas 2023-08-19 17:07:31 +01:00
parent c6ab3c37fb
commit a3c639ff49

View file

@ -217,11 +217,11 @@ Attributes:
Validations:
| Key | Description | Required | Type | Default | Valid values |
| --------- | ------------------------------------------------------------------------------------------------ | -------- | ------- | ------- | ------------------------------------------------------------------------ |
| required | Prevents form submission until element is completed. | Optional | Boolean | false | - |
| is_number | Prevents form submission until element is filled with a number. | Optional | Boolean | false | - |
| regex | Prevents form submission until element is filled with a value that match the regular expression. | Optional | String | - | a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) |
| Key | Description | Required | Type | Default | Valid values |
| --------- | ----------------------------------------------------------------------------------------- | -------- | ------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| required | Prevents form submission if the input is empty. | Optional | Boolean | false | - |
| is_number | Prevents form submission if the value of the input is not a number. | Optional | Boolean | false | - |
| regex | Prevents form submission if the value of the input does not match the regular expression. | Optional | String | - | a [JavaScript regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) |
### Dropdown