Class fever.data.validators.NumberValidator

Description

Validates Number value.

Differents tests can be done :

See Also

Field Index

allowNegative, decimalSeparator, domain, maxValue, minValue, precision, thousandsSeparator

Inherited from Validator

Method Index

new NumberValidator()

Inherited from Validator

Constructor Detail

NumberValidator

public function NumberValidator()

Constructor.

Field Detail

allowNegative

public allowNegative:Boolean
Specifies whether negative numbers are permitted. Valid values are true or false. The default value is true.

decimalSeparator

public decimalSeparator:String
The character used to separate the whole from the fractional part of the number. Cannot be a digit and must be distinct from the thousandsSeparator. The default value is ".".

domain

public domain:String
Type of number to be validated. Permitted values are fever.utils.ASType.REAL and fever.utils.ASType.INT. Default value is fever.utils.ASType.REAL.

maxValue

public maxValue:Number
Maximum value for a valid number. The default value is "NaN", which means it is ignored.

minValue

public minValue:Number
Minimum value for a valid number. The default value is "NaN", which means it is ignored.

precision

public precision:Number
The maximum number of digits allowed to follow the decimal point.

Note: Setting to 0 has the same effect as setting domain to fever.utils.ASType.INT. The default value is "NaN", which means it is ignored.

thousandsSeparator

public thousandsSeparator:String
The character used to separate thousands in the whole part of the number.