mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
aeb852e168
* Remove username from UI code * Remove username from tests * Remove username from database * Modify server endpoints for removing username * Implement backend aspects of removing username * Update API docs * Add name to fleetctl
17 lines
276 B
JavaScript
17 lines
276 B
JavaScript
import { size } from "lodash";
|
|
|
|
const validate = (formData) => {
|
|
const errors = {};
|
|
const { name } = formData;
|
|
|
|
if (!name) {
|
|
errors.name = "Full name must be present";
|
|
}
|
|
|
|
const valid = !size(errors);
|
|
|
|
return { valid, errors };
|
|
};
|
|
|
|
export default { validate };
|