When comparing a value introduced in a text field where the numeric values rule is applied with a min value the rule compares them as strings and the result is not the expected one. My idea is to fix it with a cast to float of the value to be compared, as it's done with the max rule.

CommentFileSizeAuthor
#2 clientside_validation-2628306-2.patch668 bytesmercepedraza
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mercepedraza created an issue. See original summary.

mercepedraza’s picture

This patch tries to solve the explained problem.

mercepedraza’s picture

Status: Needs work » Needs review
joelpittet’s picture

Status: Needs review » Needs work

This is great for consistency, though shouldn't we do it in all cases? There are 4 min values got in the same way and 3 other max values that don't have floatval() casts.

Jelle_S’s picture

Status: Needs work » Fixed

Fix that should catch all numeric settings pushed to dev.

  • Jelle_S committed fb9d381 on 7.x-2.x authored by mercepedraza
    Issue #2628306 by mercepedraza: Numeric values rule fails to validate...

Status: Fixed » Closed (fixed)

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