0

I want to make this field required. Can anyone suggest how to do it?

<TextControl
    tagName="p"
    label="url"
    placeholder="http://"
    focus = {focus}
    className="full-width "
    value={ props.attributes.url }
    onChange={ onChangeurl }
    keepPlaceholderOnFocus= {true}
/>

1 Answer 1

0

This could possibly done using lockPostSaving

Some code example ➡ https://github.com/WordPress/gutenberg/pull/16713

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.