nice-elements 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +10 -1
- package/dist/nice.min.js +1 -1
- package/package.json +1 -1
- package/src/components/nice-input/nice-input.html +4 -1
- package/src/components/nice-input/nice-input.js +6 -0
package/package.json
CHANGED
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
|
|
27
27
|
<div ng-if="forma.$error && forma.$dirty">
|
|
28
28
|
<div class="error-message" ng-if="forma.$dirty && forma.$error.email" translate translate-context="Nice">Email is not valid.</div>
|
|
29
|
-
<div class="error-message" ng-if="forma.$dirty && forma.$error.pattern"
|
|
29
|
+
<div class="error-message" ng-if="forma.$dirty && forma.$error.pattern">
|
|
30
|
+
<span ng-if="regexError">{{ regexError }}</span>
|
|
31
|
+
<span ng-if="!regexError" translate translate-context="Nice">This field requires a specific pattern.</span>
|
|
32
|
+
</div>
|
|
30
33
|
<div class="error-message" ng-if="forma.$error.minlength">
|
|
31
34
|
<translate translate-context="Nice">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context="Nice">characters</translate>.
|
|
32
35
|
</div>
|
|
@@ -11,6 +11,8 @@ angular.module('niceElements')
|
|
|
11
11
|
type: '@',
|
|
12
12
|
title: '@?',
|
|
13
13
|
regex: '@?',
|
|
14
|
+
regexRaw: '@?',
|
|
15
|
+
regexError: '@?',
|
|
14
16
|
placeholder: '@',
|
|
15
17
|
min: '@?',
|
|
16
18
|
max: '@?',
|
|
@@ -101,6 +103,10 @@ angular.module('niceElements')
|
|
|
101
103
|
scope.regexexp = new RegExp(scope.regex);
|
|
102
104
|
}
|
|
103
105
|
|
|
106
|
+
if (angular.isDefined(scope.regexRaw) && scope.regexRaw != '') {
|
|
107
|
+
scope.regexexp = regexRaw;
|
|
108
|
+
}
|
|
109
|
+
|
|
104
110
|
scope.$watch('model', function (value_new, value_old) {
|
|
105
111
|
scope.internalModel = scope.model;
|
|
106
112
|
});
|