This is the state of the Application. Validate function should return true if there are non zero, non empty and non empty array inside the state...
const [state, setState] = useState({
priceType: 0,
recurrenceType: 0,
start_date: '',
end_date: '',
minCapacity: 0,
maxCapacity: 0,
price: 0,
min: 0,
max: 0,
days: []
});
I'm trying in this way but not giving correct result,
const validate=Object.values(state).every((item)=>(item===0 && item==='' && item===[]))
Any suggestion....
Thanks in advance