Your question is fairly open-ended, but here is one way to do it. For any antichain $A\subset P$, consider the name $\dot a_A=\{\langle\check a,a\rangle\mid a\in A\}$, which is a mixture of the elements of $A$ on the antichain $A$. This is the name that is trying to be an element of $A$, with values determined by $A$ itself.
Theorem. The following are equivalent, for a filter $G\subset P$.
- $G$ is $V$-generic.
- $(\dot a_A)^G\in A$ for each maximal antichain $A\subset P$.
- $(\dot a_A)^G$ is nonempty for every maximal antichain.
Proof. The filter $G$ is generic if and only if it meets every maximal antichain, and in this case, 2 will hold, and clearly 2 implies 3. If 3 holds, then there must be some $a\in A\cap G$, and so $G$ will be $V$-generic. QED
Miha suggests a similar idea in the comments, namely, take any nonempty set $x$, and consider the names $\dot x=\{\langle\check y,a\rangle \mid y\in x\text{ and }a\in A\}$, for any maximal antichain $A$. Miha's observation is that although every condition forces $\check x=\dot x$, nevertheless if $G$ is not generic and misses the antichain $A$, then $\dot x^G$ will be empty. This idea arrives at the following, which seems to meet the requirement of your question.
Theorem. (Miha Habič, in comments) The following are equivalent:
- $G$ is $V$-generic.
- $G$ interprets all names for non-zero ordinals as non-zero ordinals. That is, if $\mathbb{1}\Vdash(\tau$ is a nonzero ordinal), then $\tau^G$ is a nonzero-ordinal.
- $G$ interprets all names for the number $1$ correctly.
Proof. Clearly 1 implies 2 and 3. Conversely, if 2 or 3 holds, let $A$ be any maximal antichain and let $\tau=\{\langle 0,a\rangle \mid a\in A\}$. This is a name forced to be the ordinal $1$, and it is easy to see that $\tau^G$ is either $0$ or $1$, depending on whether $G$ meets $A$. So $1$ holds. QED
One can use dense sets instead of antichains, which will avoid a dependence on AC.
Lastly, let me add then when you are entertaining the idea of interpreting names via a filter that is not generic, then you should not be using the value as you have defined it, but rather you should be using the Boolean ultrapower instead. In this method, you use the Boolean algebra rather than just a partial order, and define the equivalence on names $\sigma=_G\tau\iff[\![\sigma=\tau]\!]\in G$, and similarly for $\sigma\in_G\tau$. Now, the ultrapower map is $x\mapsto [\check x]_G$, meaning the equivalence class under this equivalence relation. The result is an elementary embedding $$j:V\to\check V_G\subseteq V^{\mathbb{B}}/G,$$whose target is the ground model of the corresponding quotient $V^{\mathbb{B}}/G$. The following theorem appears in the Boolean ultrapower paper:
Theorem. The following are equivalent:
- $G\subset P$ is $V$-generic.
- The Boolean ultrapower by $G$ is an isomorphism of $V$ with $\check V/G$.
This theorem is part of the explanation that "non-generic" is the right generalization of "non-principal" when considering the ultrapower on a complete Boolean algebra instead of merely on a powerset.