views:

40

answers:

1

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.

A: 

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...

lonesomeday
i am building a online question answer form, which will change depending upon the question type, the forms will be loaded dynamically and the validators(some validators) were not working when i generated forms dynamically in controller... hope you understood.. and thank you @lonesomeday
Harish Kurup