informel

62 posts

informel banner
informel

informel

@informel_js

Framework-agnostic js forms library. Lightweight ・0 dependency・#usetheplatform - Automatically shows validation errors - Supports zod schemas - ... and more!

Katılım Şubat 2023
2 Takip Edilen10 Takipçiler
informel
informel@informel_js·
Need to validate an email field? Just use <input type="email" />. An url field? Use <input type="url" />. The value will be automatically validated as being a valid email or url. No need to come with your own regexes.
English
0
1
0
81
informel
informel@informel_js·
Some good reminders about HTML5 built-in form validation features. freecodecamp.org/news/form-vali… Informel relies on those (checkValidity(), setCustomValidity() etc...) and augments them in order to show errors when it's appropriate. #showing-validation-errors" target="_blank" rel="nofollow noopener">informel.site/#showing-valid…
English
1
1
0
82
Renato Ribeiro
Renato Ribeiro@renatoribz·
What's the best form library for React currently?
English
3
1
3
1.5K
informel
informel@informel_js·
@stevekrouse @ValDotTown Couple that with informel, which adds front end validation, automatically sends form data as ajax and works with vanilla html forms and it's 🤌 #sending-ajax-request-on-submit" target="_blank" rel="nofollow noopener">informel.site/submitting#sentwitter.com/Julien_Delort/…
Julien Delort@Julien_Delort

Introducing informel, a lightweight framework-agnostic headless forms library: juliendelort.github.io/informel/. Main features 👇 (Using React? Check out the last tweet). #forms #formlibrary #javascript #react #webcomponents #FrontEnd

English
0
0
1
20
informel
informel@informel_js·
@laurieontech Suggesting informel 👀 It's framework agnostic: works in React but also in any other framework or vanilla js. No need to look for a new forms library if you change your stack! twitter.com/Julien_Delort/…
Julien Delort@Julien_Delort

Introducing informel, a lightweight framework-agnostic headless forms library: juliendelort.github.io/informel/. Main features 👇 (Using React? Check out the last tweet). #forms #formlibrary #javascript #react #webcomponents #FrontEnd

English
0
0
2
135
Laurie
Laurie@laurieontech·
What do people use for forms in react these days?
English
21
3
21
21.1K
informel
informel@informel_js·
@kentcdodds @nickemccurdy Suggesting informel as well 👀 It's framework agnostic: works in React but also in any other framework or vanilla js. No need to look for a new forms library if you change your stack! twitter.com/Julien_Delort/…
Julien Delort@Julien_Delort

Introducing informel, a lightweight framework-agnostic headless forms library: juliendelort.github.io/informel/. Main features 👇 (Using React? Check out the last tweet). #forms #formlibrary #javascript #react #webcomponents #FrontEnd

English
0
0
0
77
Kent C. Dodds 🏹
Kent C. Dodds 🏹@kentcdodds·
This is validating. I've been teaching for years that folks should go against the docs and instead default to uncontrolled inputs instead. Glad to see the react docs get updated in this way.
English
7
10
223
76.7K
informel
informel@informel_js·
@DavidKPiano This is what informel relies on under the hood and it was created to enhance it. For example, getting form values that way doesn't work well with checkboxes. Or required fields are marked invalid on load before any interaction. Informel makes those features what they should be.
English
0
0
0
13
David K 🎹
David K 🎹@DavidKPiano·
⚛️ React tip: for most forms, you don't need useState()... or any hooks at all! You can read form data directly from the form by element name: Object.fromEntries(new FormData(formEl)); You don't even need a form library most of the time.
David K 🎹 tweet mediaDavid K 🎹 tweet media
English
92
493
3.6K
0
informel
informel@informel_js·
@jacobmparis This is what informel uses under the hood for custom validation 👀 #custom-validation-rules" target="_blank" rel="nofollow noopener">informel.site/validation-rul… #usetheplatform
English
1
0
0
23
jacob paris ▲
jacob paris ▲@jacobmparis·
Little-known tip 🔥 input.setCustomValidity( `This is a browser native custom error message`, ) - Put that in an onInput handler - wrap some conditions around it - and you get browser-native form validation that can depend on other inputs jacobparis.com/guides/react-f…
jacob paris ▲ tweet media
English
3
4
24
1.7K
informel
informel@informel_js·
Form libraries should make things simpler but still leave you in control. They shouldn't take your <input> away from you in favor of some custom <Input/> component. #usetheplatform
English
0
1
0
128
informel
informel@informel_js·
@asidorenko_ 💯. informel was built with that simplicity in mind. That form remains the same, just wrapped within <InformEl>, which brings more features: custom errors, getting the values, dirty state etc...
English
0
0
0
44
Alex Sidorenko
Alex Sidorenko@asidorenko_·
Multi-page forms with validation can be simple.
English
7
18
199
39.3K
informel
informel@informel_js·
@asidorenko_ This works... until you have a checkbox 🙂. You'll have to handle the specificity of different element types and repeat this logic for every form. With informel you can just wrap the form with <InformEl> and listen to onInformSubmit. You'll get the values directly as an object!
English
0
0
0
20
Alex Sidorenko
Alex Sidorenko@asidorenko_·
Something to try before reaching for React form library.
Alex Sidorenko tweet media
English
22
25
441
58.9K
informel
informel@informel_js·
@feelbettermyluv Ah I see, they do backend validation as well and wire the errors back to the front-end. We only support front-end validation for now. That's a nice implementation, though, we might consider something like this for a future version.
English
0
0
0
9
Philipp Keller
Philipp Keller@philkellr·
I totally underestimated form handling I'm building a multistep form to enter a real estate listing, including multi-image upload My estimate: 15h Spent so far: >30h I might lack experience. Or form handling is really hard. Tips welcome. Stack: next.js / Python
Philipp Keller tweet media
English
28
0
36
9.4K
informel
informel@informel_js·
@feelbettermyluv Technically it should work with SSR since the web component just wraps the form and it should kick in during hydration. We have a specific version in the docs for Remix: informel.site/remix
English
0
0
0
17
informel
informel@informel_js·
@philkellr @gommo Informel adds the validation part, and it relies on the native HTML attributes (required, min/max length, pattern etc...) 🙂 twitter.com/informel_js/st…
informel@informel_js

informel tip #6 You don't need much to add validation to your forms: - Wrap the <form> element with <inform-el> - And wrap your fields with <inform-fields> And that's it! Validation errors will be shown! informel doesn't change your forms, it just enhances them! @reactjs👇

English
1
1
2
77
Philipp Keller
Philipp Keller@philkellr·
@gommo Thanks for the compassion… It seems that *some* part are supported by html now (like required and minLength/maxLength), but validation errors are not, the label/input combo is super verbose, …
English
2
0
1
307
Mitchell Wright
Mitchell Wright@mitchellbwright·
What's the React form library everyone is using these days? Just wondering if there's any that I should check out 👀
English
3
0
0
416