Yes, it can be used as evidence but it's not a 100% proof that you did whatever the message says. You and you bf can take a stand and testify under the penalty of perjury and hopefully the judge believes you.
<a href="http://thecorporateattorneys.com/">San Diego business lawyer Sergei Tokmakov</a>.
A text message, just like anything you write, can potentially be used as evidence against you. I think a jury is likely to believe your own words, and probably would think that your boyfriend was just lying to protect you.