Validate Loopy Solutions
C# 803 579bytes

Complete program, reads from STDIN, should cope with any common new-line scheme as long as it has line feeds. Thanks to HackerCow for pointing out that I don't have to append a new line in a different question, prompting me to remove it here and save 4 bytes

Golfed code:

using C=System.Console;class P{static void Main(){var D=C.In.ReadToEnd().Replace("\r","").Split('\n');int w=D[0].Length+2,h=D.Length+1,i=0,j,c,T=0,O=1,o,z,R=0;var B=new int[w,h];var S=new int[w*h*9];for(;i++&lt;w-2;)for(j=0;j&lt;h-2;B[i,j]=c)if((c=(D[j++][i-1]-8)%10)&gt;5){c=5;T++;S[0]=i+j*w;}for(i=0;++i&lt;w-1;)for(j=0;++j&lt;h-1;)R=(i%2+j%2&gt;1&amp;(o=B[i,j-1]%2+B[i-1,j]%2+B[i+1,j]%2+B[i,j+1]%2)&gt;0&amp;o!=2)|((c=B[i,j])&lt;4&amp;c!=o)?7:R;for(o=h=0;o&lt;O;B[i,j]=0)if(B[i=(c=S[o++])%w,j=c/w]&gt;4){h++;S[O++]=(S[O++]=c-w-1)+2;S[O++]=(S[O++]=c+w-1)+2;z=j%2&lt;1?w*2:2;S[O++]=c-z;S[O++]=c+z;}C.Write(h-R&lt;T?"n":"y");}}


The code performs 3 checks, first checking the number of lines around each number and that each junction has 0 or 2 lines leading from it, then that all the lines are joined together.

Formatted code:

using C=System.Console;

class P
{
    static void Main()
    {
        var D=C.In.ReadToEnd().Replace("\r","").Split('\n');
        int w=D[0].Length+2,h=D.Length+1,i=0,j,c,T=0,O=1,o,z,R=0;
        var B=new int[w,h]; // this is the grid
        var S=new int[w*h*9]; // this is a list of joined up lines (stored as x+y*w)

        for(;i++&lt;w-2;)
            for(j=0;j&lt;h-2;B[i,j]=c)
                if((c=(D[j++][i-1]-8)%10)&gt;5)
                { // we are a line
                    c=5;
                    T++; // increment line counter
                    S[0]=i+j*w; // set start of loop
                }

        for(i=0;++i&lt;w-1;) // this loop checks the numbers and that every + has 0 or 2 lines leading from it
            for(j=0;++j&lt;h-1;)
                R=(i%2+j%2&gt;1&amp;(o=B[i,j-1]%2+B[i-1,j]%2+B[i+1,j]%2+B[i,j+1]%2)&gt;0&amp;o!=2)|((c=B[i,j])&lt;4&amp;c!=o)?7:R; // set R to 7 (no significance) if check fails

        for(o=h=0;o&lt;O;B[i,j]=0) // this loops through the list of joined lines adding more until the whole loop has been seen
            if(B[i=(c=S[o++])%w,j=c/w]&gt;4)
            {
                h++; // increment "seen" counter
                S[O++]=(S[O++]=c-w-1)+2;
                S[O++]=(S[O++]=c+w-1)+2;
                z=j%2&lt;1?w*2:2; // special for | and -
                S[O++]=c-z;
                S[O++]=c+z;
            }

        C.Write(h-R&lt;T?"n":"y"); // check if R is greater than 0 or h is less than T and output appropriately
    }
}