I want to set a push rule such that when the wrong JIRA ticket message is used, it will get rejected

For example, branch name is origin/feature/FC-1234. When using
git commit -m 'FC-4321: blah blah blah", this would get rejected. as JIRA Id in commit does not match the JIRA Id in branch name