@progressive-development/pd-forms 0.1.25 → 0.1.26

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent pd-forms following open-wc recommendations",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.1.25",
6
+ "version": "0.1.26",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -90,8 +90,9 @@ export class PdFormContainer extends PdBaseUI {
90
90
  <slot></slot>
91
91
  ${this.requiredFieldInfo ? html`
92
92
  <div class="validation-info-container">
93
- <p class="validation-info ${(this._requiredFieldsValid && this.commonError === "") ? 'filled' : 'unfilled'}">
94
- ${this.commonError || msg('* Pflichtfeld',{desc: '#pd.form.required.info#'})}
93
+ <p class="validation-info ${(this._requiredFieldsValid && (!this.commonError || this.commonError === "")) ? 'filled' : 'unfilled'}">
94
+ ${this.commonError || (this._requiredFieldsValid ? msg('* Pflichtfelder ausgefüllt',{desc: '#pd.form.required.valid#'})
95
+ : msg('* Pflichtfeld',{desc: '#pd.form.required.info#'}))}
95
96
  </p>
96
97
  </div>` : ''}
97
98
  </form>
@@ -151,6 +152,7 @@ export class PdFormContainer extends PdBaseUI {
151
152
  msg("Format +49123 123456 verwenden",{desc: '#pd.form.field.invalid.phone#'}));
152
153
  validateByType("vat", PdFormContainer._vatIsValid,
153
154
  msg("Format DE0123456789 verwenden",{desc: '#pd.form.field.invalid.vat#'}));
155
+ // eslint-disable-next-line no-restricted-globals
154
156
  validateByType("number", (val) => !isNaN(val),
155
157
  msg("Nur Zahlen erlaubt",{desc: '#pd.form.field.invalid.number#'}));
156
158