Closed dimitriBouteille closed 5 years ago
Not all attributes are yet supported when used within a metabox, only on the front-end side. I'll look to bring more support of attributes on the JS components.
While there is not yet a full support of attributes, I can suggest you to define a required
validation rule on the field like so:
Field::text('title', [
'rules' => 'required'
])
The 2.0
branch now contains an update with support of attributes to most of the fields components. Custom class names are supported as well as data-
attributes and other. But as this is now ReactJs controlled components, not sure all attributes are relevant. It's there now, coming on the 2.0.2
release.
I tried to add the "attributes" property to a text field (Field::text) , but it doesn’t work in version 2.0 :(