The two requirements for a problem to be in NP are
- it must be possible to check a given solution in polynomial time;
- there must be some polynomial $f$ such that solutions to instances of length $n$ have size at most $f(n)$.
Properly, the "solutions" are referred to as "certificates" since they don't have to be an actual solution to the problem. Normally, the certificate to something like a satisfiability problem would be a satisfying truth assignment, but anything that "proves" the instance is in the langauge is acceptable. In particular, the proof that every language in NP can be thought of in these terms uses a description of the accepting computation of a Turing machine as the certificate.
This gives intuition why the certificate has to have polynomial length: the Turing machine was only allowed to run for a polynomial number of steps. Indeed, if you dropped the polynomial length requirement on the certificate, even the halting problem would "be in NP". The certificate would be a description of the steps taken by the Turing machine before it halts; you can easily check in polynomial time that a certificate is valid, but the certificate itself might have arbitrary length.