Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File input decorators #141

Open
DocAmaroo opened this issue Feb 24, 2023 · 0 comments
Open

File input decorators #141

DocAmaroo opened this issue Feb 24, 2023 · 0 comments

Comments

@DocAmaroo
Copy link

Hi! I searched for similar issue to avoid duplicate, but I cannot find one, so here I am to post my “issue” / potential feature.

I was looking for decorators, just like the @rxweb/reactive-form-validators provides, but it seems not have been implemented. It would be so elegant to use them this way, and keep all this logic in a single input class, just like the example below:

export class UserInputs {
  @required()
  @email()
  email: string;

  @prop()
  @maxFileSize(1024)
  @extensionAccepted('.zip') // => string or regular expression
  profilePicture: FileInput;
}

This way will could follow how rxweb implement it to create custom messages or even more.

Thanks for your time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant