javascript – What are the best practices for validating a form with the help of React?

I'm trying to validate several input fields using React. I'm using a simple if-else block for each input field, but I'd like to optimize my code and improve it. I think there may be a better way to validate multiple input fields.
This is the code I use for validation: –

        validateForm = () => {
const {
firstName, lastName, mobileNo, city, empType, salary
} = this.state;

if (first name! == & # 39;) {
this.setState ({
firstNameMsg: & # 39;
validFirstName: false
});
} other {
this.setState ({
firstNameMsg: "Please enter a name vaild."
validFirstName: true
});
}
if (lastName! == & # 39;) {
this.setState ({
lastNameMsg: & # 39;
validelastName: false
});
} other {
this.setState ({
lastNameMsg: 'Please enter a last name vaild.'
validLastName: true
});
}

if (mobileNo.match (/ ^ ( +  d {1,3}[- ]?)?  d {10} $ /) &&! (mobileNo.match (/ 0 {5,} /))) {
this.setState ({
mobileNoMsg: ",
validMobileNo: false
});
} other {
this.setState ({
mobileNoMsg: "Please enter a mobile phone number vaild."
validMobileNo: true
});
}

if (city! == & # 39;) {
this.setState ({
cityMsg: & # 39;
validCity: false
});
} other {
this.setState ({
cityMsg: "Please enter a city vaild."
validCity: true
});
}

if (empType! == & # 39; Independents & # 39;) {
this.setState ({
empTypeMsg: & # 39;
validEmpType: false
});
} other {
this.setState ({
empTypeMsg: "Some msg",
validEmpType: true
});
}

if (salary! == & # 39;) {
this.setState ({
MSg salary: ",
validSalary: false
});
} other {
this.setState ({
SalgMsg: "Please enter a salary vaild."
validSalary: true
});
}
}

Any help or suggestion is appreciated. Thank you.