Update name regex to support all supported locales.
--HG-- branch : develop
This commit is contained in:
parent
0467033855
commit
c79c4ed256
|
@ -42,7 +42,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="formatVersion">
|
<xs:simpleType name="formatVersion">
|
||||||
|
|
|
@ -475,7 +475,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="units">
|
<xs:simpleType name="units">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:simpleType name="shortName">
|
<xs:simpleType name="shortName">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:pattern value="^([^0-9*/^+\-=\s()?%:;!.,`'\"]){1,1}([^*/^+\-=\s()?%:;!.,`'\"]){0,}$"/>
|
<xs:pattern value="^([^\p{Nd}\p{Zs}*/&|!<>^\-()–+−=?:;'\"]){1,1}([^\p{Zs}*/&|!<>^\-()–+−=?:;\"]){0,}$"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="units">
|
<xs:simpleType name="units">
|
||||||
|
|
|
@ -93,8 +93,11 @@ QT_WARNING_DISABLE_GCC("-Wattributes")
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
inline QString NameRegExp()
|
inline QString NameRegExp()
|
||||||
{
|
{
|
||||||
//Same regexp in pattern.xsd shema file. Don't forget synchronize.
|
//Same regexp in pattern.xsd shema file. Don't forget to synchronize.
|
||||||
return QStringLiteral("^([^0-9*/^+\\-=\\s()?%:;!.,`'\"]){1,1}([^*/^+\\-=\\s()?%:;!.,`\"]){0,}$");
|
// \p{Nd} - \p{Decimal_Digit_Number}
|
||||||
|
// \p{Zs} - \p{Space_Separator}
|
||||||
|
// Note. All three minus characters are different!
|
||||||
|
return QStringLiteral("^([^\\p{Nd}\\p{Zs}*/&|!<>^\\-()–+−=?:;'\"]){1,1}([^\\p{Zs}*/&|!<>^\\-()–+−=?:;\"]){0,}$");
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user