Imagine the horror of learning that your son or daughter, brother or sister was brutally beaten, all so the attacker could film the violence and post it on social media.

Attacks motivated by social media are on the rise. Sadly, this is an unintended consequence of the growing use of social media.

A San Fernando Valley resident, Ed Peisner, had to live this nightmare in December. His son, Jordan, was leaving a Wendy’s restaurant with a group of friends when he was viciously attacked by another teen, someone Jordan did not know and had never met. The attacker’s friend filmed the assault and posted it to social media, where it quickly went viral. This sick desire for internet attention left Jordan with severe, life-threatening injuries, including a blood clot in his brain and permanent hearing loss.

To ensure that no one else has to suffer the senseless violence that Jordan did, I have introduced Assembly Bill 1542 — “Jordan’s Law.”

Jordan’s Law will make it a crime to conspire with an attacker to film a violent felony

To stop these attacks, we need to make clear that planning with an attacker to videotape violence is not a benign action; rather, it is the videographer’s very assistance that provides the real motivation here.

These social media motivated attacks planned for the purpose of filming and posting online to achieve internet fame are dramatically increasing in frequency.

In 2009, the first few reports appeared of teens striking unsuspecting victims in the back of the head with the intention of knocking them unconscious, while accomplices filmed the beating. This year, in January alone, I read about seven different social media motivated attacks.

These incidents include a Chicago girl who has been accused of planning and carrying out an assault on a younger student on a bus, and having a classmate film the fight and post it to Facebook.

Four teenagers have been accused of torturing a Chicago special-needs teen and broadcasting the incident on Facebook Live.

And two New Orleans men posted on Facebook a video of themselves beating a transgender woman while shouting transphobic slurs.

We can see from this surge in social media motivated attacks that the ability to film, view and share video footage on our phones instantaneously has produced new behavior, especially among teenagers. Teens view these attacks online, get desensitized and engage in a shocking game of one-upmanship to gain attention.

Unfortunately, our criminal code has not kept pace with these technology-driven social changes. This is why we need Jordan’s Law, which will stand as a strong deterrent to our youth and make clear that this behavior is simply unacceptable.

Jordan’s Law does not prohibit any person who comes upon an attack and decides, for whatever reason, that he or she wants to film it, from doing so. This bill will not bar news organizations or innocent bystanders from filming assaults. And, it requires the courts to prove, beyond any reasonable doubt, that the assailant who actively planned with the attacker to film the crime.

It is important that all existing free speech rights stay intact with Jordan’s Law.

The Peisners have taken up this fight, and I have proudly joined with them. I am inspired by their determination, as Ed says, to turn a mess into a message.

With this in mind, I will work tirelessly with my colleagues in Sacramento to pass Jordan’s Law this year.

Matt Dababneh, D-Van Nuys, is a member of the California Assembly, representing the 45th District.