cleaned redundant imports and cleaned validation
This commit is contained in:
parent
73edae78fd
commit
452327ea9b
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
import "bootstrap/dist/css/bootstrap.min.css";
|
import "bootstrap/dist/css/bootstrap.min.css";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { Col, FormGroup, Row, Container, Label } from "reactstrap";
|
import { Col, FormGroup, Row, Container, Label } from "reactstrap";
|
||||||
import { Formik, Form, Field } from "formik";
|
import { Formik, Form } from "formik";
|
||||||
import * as Yup from "yup";
|
import * as Yup from "yup";
|
||||||
import { Input, Submit } from "formstrap";
|
import { Input, Submit } from "formstrap";
|
||||||
import { callAPI } from "../../../actions/API";
|
import { callAPI } from "../../../actions/API";
|
||||||
@ -22,10 +22,8 @@ const InputValidation = Yup.object().shape({
|
|||||||
)
|
)
|
||||||
.required("Please enter a domain"),
|
.required("Please enter a domain"),
|
||||||
username: Yup.string().min(2, "Too Short!").required("Required"),
|
username: Yup.string().min(2, "Too Short!").required("Required"),
|
||||||
original_server: Yup.string()
|
original_server: Yup.string().required("Please enter a valid IPv4 or domain"),
|
||||||
.required("Please enter a valid IPv4 or domain"),
|
new_server: Yup.string().required("Please enter a valid IPv4 or domain"),
|
||||||
new_server: Yup.string()
|
|
||||||
.required("Please enter a valid IPv4 or domain"),
|
|
||||||
agent_booked: Yup.string()
|
agent_booked: Yup.string()
|
||||||
.min(2, "Too short!")
|
.min(2, "Too short!")
|
||||||
.required("Please enter your name!"),
|
.required("Please enter your name!"),
|
||||||
@ -101,7 +99,9 @@ export const CPanelBooking = (timeslots) => {
|
|||||||
className="has-success"
|
className="has-success"
|
||||||
>
|
>
|
||||||
<option>Select</option>
|
<option>Select</option>
|
||||||
{timeslots.timeslots.map((slot) => <option>{slot}</option>)}
|
{timeslots.timeslots.map((slot) => (
|
||||||
|
<option>{slot}</option>
|
||||||
|
))}
|
||||||
</Input>
|
</Input>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
Reference in New Issue
Block a user