@rxdi/forms 0.7.232 → 0.7.233

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.
Files changed (2) hide show
  1. package/dist/form.group.js +18 -1
  2. package/package.json +2 -2
@@ -162,7 +162,24 @@ class FormGroup {
162
162
  }
163
163
  }
164
164
  if (this.type === 'number') {
165
- value = Number(value);
165
+ let val = Number(value);
166
+ const maxAttr = this.getAttribute('max');
167
+ if (maxAttr) {
168
+ const max = Number(maxAttr);
169
+ if (!isNaN(max) && val > max) {
170
+ val = max;
171
+ this.value = String(val);
172
+ }
173
+ }
174
+ const minAttr = this.getAttribute('min');
175
+ if (minAttr) {
176
+ const min = Number(minAttr);
177
+ if (!isNaN(min) && val < min) {
178
+ val = min;
179
+ this.value = String(val);
180
+ }
181
+ }
182
+ value = val;
166
183
  }
167
184
  const inputsWithBindings = [
168
185
  ...(self
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdi/forms",
3
- "version": "0.7.232",
3
+ "version": "0.7.233",
4
4
  "main": "./dist/index.js",
5
5
  "author": "Kristiyan Tachev",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "build": "tsc"
13
13
  },
14
14
  "devDependencies": {
15
- "@rxdi/lit-html": "^0.7.231",
15
+ "@rxdi/lit-html": "^0.7.232",
16
16
  "@types/node": "^25.0.3",
17
17
  "rxjs": "^7.8.2",
18
18
  "typescript": "^5.9.3"