added error message for frontend validation