score:0

    validate = (name, value) => {
        let error = "";
        switch (name) {
          case "name":
            error = (!value || value.length == 0) && "Please enter the name";
            break;
    }
            return error;
}

Related Query

More Query from same tag