Cura/resources/qml/Validators/FloatValidator.qml
2022-12-01 16:58:29 +01:00

11 lines
336 B
QML

// Copyright (c) 2022 UltiMaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.15
RegularExpressionValidator
{
property int maxBeforeDecimal: 11
property int maxAfterDecimal: 3
regularExpression: new RegExp("^-?[0-9]{0,%0}[.,]?[0-9]{0,%1}$".arg(maxBeforeDecimal).arg(maxAfterDecimal))
}