【发布时间】:2014-02-21 20:09:00
【问题描述】:
我正在尝试为 Symfony2 包(在标准 src/site/BundleName/Resources/config/validation.yml 文件中)中的表单编写属性验证选项,我想知道如何将语句拆分为两个线。照原样,这是:
department:
- Type: string
- Choice:
choices: ['Customer Service', 'Development', 'Finance', 'Human Resources', 'Marketing', 'Production', 'Quality Management', 'Research', 'Sales']
正确编译。但是,当我尝试这样拆分语句时:
department:
- Type: string
- Choice:
choices: ['Customer Service', 'Development', 'Finance', 'Human Resources', 'Marketing', 'Production',
'Quality Management', 'Research', 'Sales']
(将“质量管理...”移至下一行并缩进)我收到以下错误:
Malformed inline YAML string ['Customer Service', 'Development', 'Finance', 'Human Resources', 'Marketing', 'Production', at line 25 (near "choices: ['Customer Service', 'Development', 'Finance', 'Human Resources', 'Marketing', 'Production',")
500 Internal Server Error - ParseException
有人知道在 .yml 文件中拆分行/语句的正确语法吗?有可能吗?
【问题讨论】: