key in obj) {
if (!obj[key]) {
this.setState({ [key + 'Error'] : key + ' is required'})
return false
} else {
this.setState({ [key + 'Error'] : '' })
}
}
}
i did this and it's working but per field, can i check the values of all of the object then return the errors one time ?
no it's not ! 🤕
Обсуждают сегодня