Cura/resources/qml/Validators/FloatValidator.qml
Joey de l'Arago ce5691c12d
Apply suggestions from code review
Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
2022-12-05 14:42:35 +01:00

12 lines
No EOL
332 B
QML

// Copyright (c) 2022 UltiMaker
// 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))
}