当前位置: 动力学知识库 > 问答 > 编程问答 >

symfony2 - Symfony custom form validation

问题描述:

I have article entity with some with a property content. Now I want to do some custom validation on the article content. For example, if there are some words in the content I want to remove them or replace them depending on the word. There are some other validation for other properties of this Article entity. I don't understand how to do this validation. I was thinking creating a ArticleValidate class and on form submit do the validation. How to do this and what would be the best practice.

分享给朋友:
您可能感兴趣的文章:
随机阅读: