diff --git a/config/version.php b/config/version.php index f427141ca5aa..4b88d4844998 100644 --- a/config/version.php +++ b/config/version.php @@ -1,7 +1,7 @@ '6.3.2', - 'patchVersion' => '2021.12.12', + 'appVersion' => '6.3.3', + 'patchVersion' => '2021.12.13', 'lib_roundcube' => '0.2.3', ]; diff --git a/install/install_schema/data.sql b/install/install_schema/data.sql index f3e64f02f6a5..be02a1cd94f7 100644 --- a/install/install_schema/data.sql +++ b/install/install_schema/data.sql @@ -3582,7 +3582,7 @@ insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generate insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,190,'createdtime','vtiger_crmentity',1,70,'createdtime','Created Time',0,0,'',NULL,19,31,2,'DT~O',3,NULL,'BAS',0,'',0,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,191,'modifiedtime','vtiger_crmentity',1,70,'modifiedtime','Modified Time',0,0,'',NULL,21,31,2,'DT~O',3,NULL,'BAS',0,'',0,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,192,'modifiedby','vtiger_crmentity',1,52,'modifiedby','Last Modified By',0,0,'','65535',22,31,2,'V~O',3,NULL,'BAS',0,'',0,'',NULL,0,0,0,0,'',NULL); -insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,193,'unit_price','vtiger_products',1,360,'unit_price','Unit Price',0,0,'','65535',1,32,1,'V~O',2,3,'BAS',0,'',1,'',NULL,0,0,0,0,'',NULL); +insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,193,'unit_price','vtiger_products',1,360,'unit_price','Unit Price',0,0,'','0,99999999',1,32,1,'V~O',2,3,'BAS',0,'',1,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,194,'commissionrate','vtiger_products',1,365,'commissionrate','Commission Rate',0,2,'','99999',2,32,2,'NN~O',1,NULL,'BAS',1,'',0,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,196,'usageunit','vtiger_products',1,15,'usageunit','Usage Unit',0,2,'','200',1,33,1,'V~O',1,NULL,'ADV',1,'',0,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,197,'qty_per_unit','vtiger_products',1,1,'qty_per_unit','Qty/Unit',0,2,'','999999999',2,33,1,'N~O',1,NULL,'ADV',1,'',0,'',NULL,0,0,0,0,'',NULL); @@ -5169,7 +5169,7 @@ insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generate insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (13,2814,'response_expected','vtiger_troubletickets',1,79,'response_expected','FL_RESPONSE_EXPECTED',0,2,'',NULL,0,444,2,'DT~O',1,0,'BAS',1,'Detail',1,'','',0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (13,2815,'solution_expected','vtiger_troubletickets',1,79,'solution_expected','FL_SOLUTION_EXPECTED',0,2,'',NULL,0,444,2,'DT~O',1,0,'BAS',1,'Detail',1,'','',0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (13,2816,'idle_expected','vtiger_troubletickets',1,79,'idle_expected','FL_IDLE_DATE_EXPECTED',0,2,'',NULL,0,444,2,'DT~O',1,0,'BAS',1,'Detail',0,'',NULL,0,0,0,0,'',NULL); -insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,2817,'purchase','vtiger_products',1,360,'purchase','FL_PURCHASE',0,2,'','65535',6,32,1,'V~O',2,3,'BAS',0,'',1,'',NULL,0,0,0,0,'',NULL); +insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (14,2817,'purchase','vtiger_products',1,360,'purchase','FL_PURCHASE',0,2,'','0,99999999',6,32,1,'V~O',2,3,'BAS',0,'',1,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (90,2818,'ssingleorders_method_payments','u_yf_ssingleorders',1,16,'payment_methods','FL_PAYMENTS_METHOD',0,2,'','255',16,284,1,'V~O',1,0,'BAS',1,'',0,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (35,2819,'purchase','vtiger_service',1,360,'purchase','FL_COST',0,2,'','65535',4,92,1,'V~O',2,3,'BAS',0,'',1,'',NULL,0,0,0,0,'',NULL); insert into `vtiger_field`(`tabid`,`fieldid`,`columnname`,`tablename`,`generatedtype`,`uitype`,`fieldname`,`fieldlabel`,`readonly`,`presence`,`defaultvalue`,`maximumlength`,`sequence`,`block`,`displaytype`,`typeofdata`,`quickcreate`,`quickcreatesequence`,`info_type`,`masseditable`,`helpinfo`,`summaryfield`,`fieldparams`,`header_field`,`maxlengthtext`,`maxwidthcolumn`,`visible`,`tabindex`,`color`,`icon`) values (15,2821,'accountid','vtiger_faq',1,10,'accountid','FL_ACCOUNT',0,2,'','4294967295',8,37,1,'V~O',1,0,'BAS',1,'',0,'',NULL,0,0,0,0,'',NULL); diff --git a/layouts/basic/modules/Vtiger/Edit/CurrenciesModal.tpl b/layouts/basic/modules/Vtiger/Edit/CurrenciesModal.tpl index f309b50d6374..b9173cd65593 100644 --- a/layouts/basic/modules/Vtiger/Edit/CurrenciesModal.tpl +++ b/layouts/basic/modules/Vtiger/Edit/CurrenciesModal.tpl @@ -9,7 +9,7 @@ {\App\Language::translate($FIELD_MODEL->getFieldLabel(), $MODULE_NAME)} @@ -34,36 +34,36 @@ + id="cur_{$CURRENCY_ID}_check" + class="small float-right js-enable-currency" + data-js="change">
+ size="10" id="{$ITEM['name']}" + class="col-md-9 js-format-numer js-converted-price form-control" + data-validation-engine="validate[funcCall[Vtiger_Currency_Validator_Js.invokeValidation]]" + data-fieldinfo="{\App\Purifier::encodeHtml(\App\Json::encode($ITEM.fieldInfo))}" + data-js="value" disabled="disabled" />
- +
@@ -72,9 +72,9 @@
+ class="js-base-currency" type="radio" disabled="disabled" + title="{\App\Language::translate('LBL_BASE_CURRENCY')}" + data-js="checked" />
diff --git a/layouts/basic/modules/Vtiger/Edit/Field/MultiCurrency.tpl b/layouts/basic/modules/Vtiger/Edit/Field/MultiCurrency.tpl index 8e794c0c907e..610ac128097c 100644 --- a/layouts/basic/modules/Vtiger/Edit/Field/MultiCurrency.tpl +++ b/layouts/basic/modules/Vtiger/Edit/Field/MultiCurrency.tpl @@ -2,6 +2,7 @@ {strip} {assign var=SPECIAL_VALIDATOR value=$FIELD_MODEL->getValidator()} + {assign var=FIELD_INFO value=\App\Purifier::encodeHtml(\App\Json::encode($FIELD_MODEL->getFieldInfo()))} {assign var=FIELD_NAME value=$FIELD_MODEL->getName()} {assign var="MODULE_NAME" value=$FIELD_MODEL->getModuleName()} {assign var="SYMBOL_PLACEMENT_ON_RIGHT" value=$USER_MODEL->get('currency_symbol_placement') eq '1.0$'} @@ -28,8 +29,8 @@ {/if} isEditableReadOnly()}disabled="disabled" {else}data-validation-engine="validate[{if $FIELD_MODEL->isMandatory() eq true} required,{/if}funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" {/if}> + title="{\App\Language::translate($FIELD_MODEL->getFieldLabel(), $MODULE_NAME)}" tabindex="{$TABINDEX}" data-fieldinfo="{$FIELD_INFO}" + {if $FIELD_MODEL->isEditableReadOnly()} disabled="disabled" {else}data-validation-engine="validate[{if $FIELD_MODEL->isMandatory() eq true} required,{/if}funcCall[Vtiger_Base_Validator_Js.invokeValidation]]" {/if} {if !empty($SPECIAL_VALIDATOR)}data-validator='{\App\Purifier::encodeHtml(\App\Json::encode($SPECIAL_VALIDATOR))}' {/if}> {if $SYMBOL_PLACEMENT_ON_RIGHT} {FUNC_CURRENCY_SYMBOL_PLACEMENT CURRENCY_SYMBOL=$CURRENCY_SYMBOL} {/if} diff --git a/modules/Vtiger/models/Field.php b/modules/Vtiger/models/Field.php index 2deed3383a89..7b676962b77b 100644 --- a/modules/Vtiger/models/Field.php +++ b/modules/Vtiger/models/Field.php @@ -589,13 +589,13 @@ public function getPicklistValues($skipCheckingRole = false) $picklistValues = App\Fields\Picklist::getValuesName($this->getName()); } foreach ($picklistValues as $value) { - $fieldPickListValues[$value] = \App\Language::translate($value, $this->getModuleName(),false,false); + $fieldPickListValues[$value] = \App\Language::translate($value, $this->getModuleName(), false, false); } // Protection against deleting a value that does not exist on the list if ('picklist' === $fieldDataType) { $fieldValue = $this->get('fieldvalue'); if (!empty($fieldValue) && !isset($fieldPickListValues[$fieldValue])) { - $fieldPickListValues[$fieldValue] = \App\Language::translate($fieldValue, $this->getModuleName(),false,false); + $fieldPickListValues[$fieldValue] = \App\Language::translate($fieldValue, $this->getModuleName(), false, false); $this->set('isEditableReadOnly', true); } } @@ -1142,11 +1142,11 @@ public function getProfileReadWritePermission() } /** - * Function returns Client Side Validators name. + * Gets default validator. * - * @return [name=>Name of the Validator, params=>Extra Parameters] + * @return array */ - public function getValidator() + public function getDefaultValidator(): array { $validator = []; $fieldName = $this->getName(); @@ -1225,6 +1225,16 @@ public function getValidator() return $validator; } + /** + * Function returns Client Side Validators name. + * + * @return array [name=>Name of the Validator, params=>Extra Parameters] + */ + public function getValidator() + { + return method_exists($this->getUITypeModel(), 'getValidator') ? $this->getUITypeModel()->getValidator() : $this->getDefaultValidator(); + } + /** * Function to retrieve display value in edit view. * diff --git a/modules/Vtiger/uitypes/MultiCurrency.php b/modules/Vtiger/uitypes/MultiCurrency.php index a85cc53bf3f5..0da0b8a988d1 100644 --- a/modules/Vtiger/uitypes/MultiCurrency.php +++ b/modules/Vtiger/uitypes/MultiCurrency.php @@ -28,6 +28,16 @@ public function getDBValue($value, $recordModel = false) return \App\Json::encode($data); } + /** + * Get validator. + * + * @return array + */ + public function getValidator(): array + { + return [['name' => 'Currency']]; + } + /** {@inheritdoc} */ public function validate($value, $isUserFormat = false) { @@ -38,19 +48,25 @@ public function validate($value, $isUserFormat = false) $value = \App\Json::decode($value); } if (!\is_array($value)) { - throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getFieldName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $value, 406); + throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $value, 406); } $currencies = \App\Fields\Currency::getAll(true); foreach ($value['currencies'] ?? [] as $id => $currency) { if (!isset($currencies[$id])) { - throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getFieldName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $id, 406); + throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $id, 406); } $price = $currency['price']; if ($isUserFormat) { $price = App\Fields\Double::formatToDb($price); } if (!is_numeric($price)) { - throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getFieldName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $price, 406); + throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . $this->getFieldModel()->getName() . '||' . $this->getFieldModel()->getModuleName() . '||' . $price, 406); + } + if ($maximumLength = $this->getFieldModel()->get('maximumlength')) { + [$minimumLength, $maximumLength] = false !== strpos($maximumLength, ',') ? explode(',', $maximumLength) : [-$maximumLength, $maximumLength]; + if ((float) $minimumLength > $price || (float) $maximumLength < $price) { + throw new \App\Exceptions\Security('ERR_VALUE_IS_TOO_LONG||' . $this->getFieldModel()->getName() . '||' . $this->getFieldModel()->getModuleName() . "||{$maximumLength} < {$price} < {$minimumLength}", 406); + } } } } @@ -131,12 +147,12 @@ public function getEditViewFormatData($value) public function getCurrencies() { $priceDetails = []; - $params = ['uitype' => 71, 'displaytype' => 1, 'typeofdata' => 'N~O', 'isEditableReadOnly' => false, 'maximumlength' => '99999999999999999']; + $params = ['uitype' => 71, 'displaytype' => 1, 'typeofdata' => 'N~O', 'isEditableReadOnly' => false, 'maximumlength' => $this->getFieldModel()->get('maximumlength')]; $fieldModel = new \Vtiger_Field_Model(); $fieldModel->setModule($this->getFieldModel()->getModule()); $fieldInfo = $fieldModel->setData($params)->getFieldInfo(); foreach (\App\Fields\Currency::getAll(true) as $id => $currency) { - $name = "currencies[$id]['value']"; + $name = "currencies[$id][value]"; $fieldInfo['name'] = $name; $priceDetails[$id] = [ 'name' => $name, diff --git a/public_html/layouts/resources/validator/BaseValidator.js b/public_html/layouts/resources/validator/BaseValidator.js index 4e4df66ee8f7..501b0f28f932 100644 --- a/public_html/layouts/resources/validator/BaseValidator.js +++ b/public_html/layouts/resources/validator/BaseValidator.js @@ -27,7 +27,7 @@ jQuery.Class( } } let listOfValidators = Vtiger_Base_Validator_Js.getValidator(field); - for (let i = 0; i < listOfValidators.length; i++) { + for (let i in listOfValidators) { let validatorList = listOfValidators[i], validatorName = validatorList.name, validatorInstance = new validatorName(), @@ -77,12 +77,12 @@ jQuery.Class( } if (fieldData.hasOwnProperty(dataValidator)) { let specialValidators = fieldData[dataValidator]; - for (key in specialValidators) { + for (let s in specialValidators) { //IE for loop fix - if (!specialValidators.hasOwnProperty(key)) { + if (!specialValidators.hasOwnProperty(s)) { continue; } - let specialValidator = specialValidators[key], + let specialValidator = specialValidators[s], tempSpecialValidator = jQuery.extend({}, specialValidator), validatorOfNames = Vtiger_Base_Validator_Js.getValidatorClassName(specialValidator.name); if (validatorOfNames !== '') { diff --git a/public_html/layouts/resources/validator/FieldValidator.js b/public_html/layouts/resources/validator/FieldValidator.js index a6369a22e757..2396023dd597 100644 --- a/public_html/layouts/resources/validator/FieldValidator.js +++ b/public_html/layouts/resources/validator/FieldValidator.js @@ -1023,10 +1023,16 @@ Vtiger_Base_Validator_Js( return false; } const maximumLength = typeof fieldData.fieldinfo !== 'undefined' ? fieldData.fieldinfo.maximumlength : null; - if (maximumLength && strippedValue > parseFloat(maximumLength)) { - errorInfo = app.vtranslate('JS_ERROR_MAX_VALUE'); - this.setError(errorInfo); - return false; + if (maximumLength) { + let ranges = maximumLength.split(','); + if ( + (ranges.length === 2 && (strippedValue > parseFloat(ranges[1]) || strippedValue < parseFloat(ranges[0]))) || + (ranges.length === 1 && (strippedValue > parseFloat(ranges[0]) || strippedValue < 0)) + ) { + errorInfo = app.vtranslate('JS_ERROR_MAX_VALUE'); + this.setError(errorInfo); + return false; + } } return true; }