preface
2. Type: Mandatory, no space allowed.
use
<Form name="basic" layout={'horizontal'} labelAlign='right' > < form. Item label=" projectName" name="projectName" rules={[{ Required: true, message: 'Please enter project name'}, {pattern: /^[^\s]*$/, message: }]} > <Input placeholder=' maxLength={50} /> </ form. Item> </Form>Copy the code