You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `options`will be rendered in a `<datalist>` element, enabling autocomplete suggestions.
707
+
- If an option's value and label are identical, the label is omitted for brevity.
708
+
709
+
See [Defining field options](#defining-field-options) for the different methods to specify the options.
710
+
711
+
#### Server-side validation
712
+
713
+
To validate this field on save, define a validation rule in your model:
714
+
715
+
```php
716
+
public $rules = [
717
+
'website' => 'nullable|url|max:2048',
718
+
];
719
+
```
720
+
721
+
> **Tip:** Use `nullable` if the field is not required but must still be a valid URL when provided.
722
+
684
723
### Widget
685
724
686
725
`widget`- renders a custom form widget, the `type` field can refer directly to the class name of the widget or the registered alias name.
@@ -950,7 +989,7 @@ Option | Description
950
989
951
990
> **NOTE:** Unlike the [Media Finder FormWidget](#media-finder), the File Upload FormWidget uses [database file attachments](../database/attachments); so the field name must match a valid `attachOne` or `attachMany` relationship on the Model associated with the Form. **IMPORTANT:** Having a database column with the name used by this field type (i.e. a database column with the name of an existing `attachOne` or `attachMany` relationship) **will** cause this FormWidget to break. Use database columns with the Media Finder FormWidget and file attachment relationships with the File Upload FormWidget.
952
991
953
-
By default, the File Upload FormWidget only allows a limited set of file extensions. You can extend this list by adding a `fileDefinitions` config in `config/cms.php` file.
992
+
By default, the File Upload FormWidget only allows a limited set of file extensions. You can extend this list by adding a `fileDefinitions` config in `config/cms.php` file.
954
993
See [Allowed file types](../setup/configuration#allowed-file-types) for more information.
0 commit comments