Can non-custodial parent claim child when other parent doesn't work or file?

I am in California.  My ex and I have shared 50% joint legal and physical, but for tax purposes she would be considered the custodial parent.  She has not worked for 8 years and does not file taxes because of this.  

 

Can I claim our child?  I have over the past few years without issue but this year she had her boyfriend claim him (and my efile was bounced back) and is stating that I was illegally claiming him.  I believe as the biological father, I have the right (next in line kind of thing).  She is claiming I need a special form signed by her which I would agree with 100% if she filed taxes.

 

Thanks in advance.