Details
Description
Steps to replicate the issue are as follows:
1) Create Price set
2) Create Price field of any non Text type (e.g. select)
3) Create exactly four priceset options with corresponding Label and Amount filled
4) Then submit
Strangely it throws validation error 'Label and value cannot be empty.' on first option as we know there is none such case. Also if we then keep any Label and Amount option null then it got submitted successfully.
Bug : Occurring at line 567 CRM/Price/Form/Field.php
if ($countemptyrows == 11)
{ $errors['option_label[1]'] = $errors['option_amount[1]'] = ts('Label and value cannot be empty.'); $_flagOption = 1; }As per now at maximum we can create maximum of 15 price field options so in above case 4 options are filled which left 11 field blank >> matches the condition >> triggers validation error. Any blank field number less or greater then 11 bypass the check and create the price field.