0
0
llucycodes42
= {
type: 'string',
required: true,
restrictions: {
length: 3,
maxLength: 255
}
}
In the code above, PropTypes.string is a type property for a string class. The property specifies the type of data that this object represents. The required property indicates that this object must be provided in order to use the object. The restriction property specifies specific restrictions on the data that this object can contain.
Library: react
Shortcut: pts
import PropTypes from 'prop-types';
PropTypes.string