@conform-to/dom 0.3.0-pre.0 → 0.3.0
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/README.md +6 -37
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,11 @@
|
|
|
1
1
|
# @conform-to/dom
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> This package is a transitive dependency for the rest of the conform packages with no intention to be used directly at the moment. Use at your own risk.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Conform is a form validation library built on top of the [Constraint Validation](https://caniuse.com/constraint-validation) API.
|
|
6
6
|
|
|
7
|
-
- [
|
|
8
|
-
- [
|
|
9
|
-
- [
|
|
10
|
-
- [getPaths](#getPaths)
|
|
11
|
-
- [isFieldElement](#isFieldElement)
|
|
12
|
-
- [isFieldsetField](#isFieldsetField)
|
|
13
|
-
- [parse](#parse)
|
|
14
|
-
- [reportValidity](#reportValidity)
|
|
15
|
-
- [setFieldState](#setFieldState)
|
|
16
|
-
- [setFieldsetError](#setFieldsetError)
|
|
17
|
-
- [shouldSkipValidate](#shouldSkipValidate)
|
|
18
|
-
- [transform](#transform)
|
|
7
|
+
- **Progressive Enhancement**: It is designed based on the [HTML specification](https://html.spec.whatwg.org/dev/form-control-infrastructure.html#the-constraint-validation-api). From validating the form to reporting error messages for each field, if you don't like part of the solution, just replace it with your own.
|
|
8
|
+
- **Framework Agnostic**: The DOM is the only dependency. Conform makes use of native [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API) exclusively. You don't have to use React / Vue / Svelte to utilise this library.
|
|
9
|
+
- **Flexible Setup**: It can validates fields anywhere in the dom with the help of [form attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#form). Also enables CSS pseudo-classes like `:valid` and `:invalid`, allowing flexible styling across your form without the need to manipulate the class names.
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### getFieldsetData
|
|
23
|
-
|
|
24
|
-
### getName
|
|
25
|
-
|
|
26
|
-
### getPaths
|
|
27
|
-
|
|
28
|
-
### isFieldElement
|
|
29
|
-
|
|
30
|
-
### isFieldsetField
|
|
31
|
-
|
|
32
|
-
### parse
|
|
33
|
-
|
|
34
|
-
### reportValidity
|
|
35
|
-
|
|
36
|
-
### setFieldState
|
|
37
|
-
|
|
38
|
-
### setFieldsetError
|
|
39
|
-
|
|
40
|
-
### shouldSkipValidate
|
|
41
|
-
|
|
42
|
-
### transform
|
|
11
|
+
Checkout the [repository](https://github.com/edmundhung/conform) if you want to know more!
|
package/package.json
CHANGED