Passing data from template to validator.yml

Discussion specific to symfony 1.1.x stable

Moderator: hartym

Passing data from template to validator.yml

Postby ringhio » Fri Aug 08, 2008 2:49 pm

Hi guys, I'm looking for a way to get data in a .yml validation file for a form (old way with compat_10) from the template where I've some hidden input tags like name_field_1, name_field_2, name_field_3... numbered in a foreach loop.

How can I pass the number of the field to the validation file? Is it possible?

Code: Select all
methods:
  post: [credits, bet_result_XXX]

names:
  credits:
    required:       true
    required_msg:   The credit field cannot be left blank
    validators:     creditsValidator
  bet_result_XXX:
    required:       true
    required_msg:   You must select a result
    validators:     creditsValidator


Thanks in advance

Daniel
User avatar
ringhio
Member
 
Posts: 57
Joined: Wed Aug 06, 2008 9:57 am

Return to symfony 1.1

Who is online

Users browsing this forum: No registered users and 2 guests