Scale Validator

Overview

Defines that scale (number of digits after '.' for decimal) of field value must be in range definied by options.

Attributes

name

type

required

default value

description

min

integer

no

none

Minimum value.

is

integer

no

none

Exact value.
When this option is definied, it overwrites 'min' and 'max' options.

max

integer

no

none

Maximum value.

message

string

no

none

Message that will be displayed in case of error.

Example

<validatesScale min="1" max="3" />
<validatesScale is="2" message="error.invalid.amount" />