return array instead of only boolean for validation