JacksonRiver/springboard_modules — comment on commit dd9a01219fd84642fa9cd4557a8b9c8d8f114424
File: fundraiser_ab/plugins/win_conditions/sustainers_percentage.inc line 48
By brockboland:

Yes, but I think it would make it more complicated to read and maintain, since that condition would need to be repeated in the current elseif and else clauses:

// See if the string ends with a percentage
if (!($value > 0 && $value <= 1) && substr(trim($value), -1) == '%') {
// Strip the percent sign
$number = rtrim(trim($value), '%');
if (!($number > 0 && $number <= 100)) {
form_set_error($field_name_prefix . 'percentage', t('Please enter a valid percentage for Percentage of Donations win condition. You can either enter it as a percentage (e.g., 45%) or a decimal value (e.g., 0.45).'));
}
}
// Not a number
elseif(!($value > 0 && $value <= 1)) {
form_set_error($field_name_prefix . 'percentage', t('Please enter a valid percentage for Percentage of Donations win condition. You can either enter it as a percentage (e.g., 45%) or a decimal value (e.g., 0.45).'));
}