Giter Site home page Giter Site logo

solform's People

Contributors

debpalash avatar ragokan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shodevacc

solform's Issues

const { values, .. } Property 'values' does not exist on type?

Can you example out how to use values?

const values: any
'values' is declared but its value is never read.ts(6133)
Property 'values' does not exist on type '{ register: (key: "email" | "count") => { ref: (ref: SolFormElement) => SolFormElement; name: "email" | "count"; }; submit: (event?: Event | undefined) => Promise<...>; ... 5 more ...; getAllValues: () => { ...; }; }'.ts(2339)

NPM package missing code

Hey, the latest NPM package (1.0.3) is missing the code and type files.
I downgraded to 1.0.2 for now.

Radio Group Support

Hi, I'm using your library (thank you ๐Ÿ™), and I'm wondering what is lacking currently in terms of support for radio groups in forms? I would be willing to contribute a PR to add support.

set same `validators` warnings for multiple values?

like how to do this?

validators: {
        email: [
          requiredValidator("This field is required"),
          emailValidator("Value should be email!"),
        ],
        name,id,captcha:[
          requiredValidator("This field is required")
        ],

can do currently:

const { register, submit, loading, getAllValues, getValue, setValue, errors, watch } =
    createForm<{ email: string; name: string, password: string, id: string, captcha: boolean }>({
      initialValues: {
      },
      validators: {
        email: [
          requiredValidator("This field is required"),
          emailValidator("Value should be email!"),
        ],
        name: [
          requiredValidator("This field is required"),
        ],
        id: [
          requiredValidator("This field is required"),
        ],
        password: [
          requiredValidator("This field is required"),
        ],
        captcha: [
          requiredValidator("Solving captcha is required"),
        ]
      },

Alter type definition for SolFormElement to include HTMLTextAreaElement

Typescript compiler currently throws an error while using solform with the textarea tag. This fix simply requires to change the type definition of the SolFormElement as the actual functionality does not change.

Current

export declare type SolFormElement = HTMLInputElement | HTMLSelectElement;

Proposed change

export declare type SolFormElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.