The reasons behind this is that php returns false for:
<?php if (is_numeric("1\n"));?>

When entering a list of numeric types, the newlines will be appended.
This results in the string "1\n".

Attached is a patch that prefixes "trim" in front of the is_numeric checks.
Should the value itself be "trimmed"??

There may be a lot more places where this needs to be done.

Comments

Component: Rules Core » Rules Engine
Status: Needs review » Needs work

The last submitted patch, rules-7.x-2.0-beta1-numeric_types-1.patch, failed testing.

fago’s picture

Status: Needs work » Fixed

>Should the value itself be "trimmed"??
Yes! I took a stab on that and improved the direct input of integers such that the values are trimmed. Also, I changed it to be comma-separated and implemented the same for lists of text tokens and lists of entities / entity ids.
Please test whether the next dev snapshot works for you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.