import React from 'react';
import { Input, Form } from '@easyv/antd';

const FormItem = Form.Item;

export default function ApiForm() {
  return (
    <FormItem
      label="Base URL"
      name="baseURL"
      rules={[
        {
          pattern: /^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i,
          message: '请输入合法的url地址'
        },
        { required: true, message: '请输入url地址!', whitespace: true }
      ]}>
      <Input placeholder={'http[s]://hostname[:port][/pathname]'} />
    </FormItem>
  );
}
