error message if invalid details entered