@descope/web-components-ui 1.0.352 → 1.0.354
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +15 -6
- package/src/mixins/inputValidationMixin.js +10 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -1992,6 +1992,7 @@ const errorAttributes = {
|
|
1992
1992
|
patternMismatch: 'data-errormessage-pattern-mismatch',
|
1993
1993
|
tooShort: 'data-errormessage-pattern-mismatch-too-short',
|
1994
1994
|
tooLong: 'data-errormessage-pattern-mismatch-too-long',
|
1995
|
+
typeMismatch: 'data-errormessage-type-mismatch',
|
1995
1996
|
};
|
1996
1997
|
|
1997
1998
|
const validationTargetSymbol = Symbol('validationTarget');
|
@@ -2050,6 +2051,11 @@ const inputValidationMixin = (superclass) =>
|
|
2050
2051
|
return `At most ${this.getAttribute('max-items-selection')} items are allowed.`;
|
2051
2052
|
}
|
2052
2053
|
|
2054
|
+
// eslint-disable-next-line class-methods-use-this
|
2055
|
+
get defaultErrorMsgTypeMismatch() {
|
2056
|
+
return `Please match the requested type.`;
|
2057
|
+
}
|
2058
|
+
|
2053
2059
|
getErrorMessage(flags) {
|
2054
2060
|
const {
|
2055
2061
|
valueMissing,
|
@@ -2073,6 +2079,10 @@ const inputValidationMixin = (superclass) =>
|
|
2073
2079
|
this.getAttribute(errorAttributes.patternMismatch) ||
|
2074
2080
|
this.defaultErrorMsgPatternMismatch
|
2075
2081
|
);
|
2082
|
+
case typeMismatch:
|
2083
|
+
return (
|
2084
|
+
this.getAttribute(errorAttributes.typeMismatch) || this.defaultErrorMsgTypeMismatch
|
2085
|
+
);
|
2076
2086
|
case tooShort:
|
2077
2087
|
return this.getAttribute(errorAttributes.tooShort) || this.defaultErrorMsgTooShort;
|
2078
2088
|
case tooLong:
|