Self-Validating Triangular Checkerboard Program
C (gcc), 189 bytes

j
;l
;b;
d;f␉
(char
␉*␉t) 
{b=*␉t%
2;for␉(␉
j=d=0;j=j
+ 1,␉l=j+ 
1,␉*␉t; ) {
for␉(;l=l- 1
 ;t=t+ 1 )b= 
!b␉,␉d=d+ !(␉*
␉t␉*␉(␉*␉t- 10)
*␉(␉*␉t%2-b) ) ;
d␉|=*␉t- 10;t=t+ 
1 ; }b= !d; } ␉ ␉ 


Try it online!

␉ represents a tab character (I'm sorry). Note that there are several trailing spaces/tabs (I'm more sorry). The original with tabs intact is best viewed in vim with :set tabstop=1 (words cannot express how sorry I am).

It's a function (called f, which isn't immediately obvious from glancing at it) that takes a string as an argument and returns either 0 or 1.

I could reduce this by at least one and probably two or more lines, but note that it gets increasingly messy and low-effort towards the end, mostly because writing such awful code (even by PPCG  standards) was making me feel like a bad person and I wanted to stop as soon as possible.

The basic idea here is to avoid constructions that necessarily break the format (++, +=, return, etc.). Miraculously, important keywords like for, char, and while (which I didn't end up using) happen to fit the alternating parity rule. Then I used spaces (even parity) and tabs (odd parity) as padding to make the rest fit the rules.