Is it possible to check the comment when using "Commit Changes to Server"

My customer has a requirement. When using "Commit Changes to Server", the comment should comply with their formatting requirement, such as must include some words or its length should not exceed 100. 
I have no idea on how to fultill the requirment.
Could you please give me some suggestion?