Question

I have created custom HTML form elements to take inputs from user, and i am not using the Symfony Form. i know that it keep me out of Symfony form validation system, Is there any way to use custom HTML element and get Symfony Form validation on that elements. I have used Symfony forms and i know how to use validators, but this time i am using custom HTML forms as Symfony form was not giving me that flexibility.

Was it helpful?

Solution

Yes. The More on Symfony book has a guide to writing your own validator. If you can say what you want the validator to achieve, I might be able to give you some pointers about how to implement it.

You do not need to use the form framework to use the validator framework, but I do wonder why you chose not to...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top