File input decorators
Opened this issue · 0 comments
DocAmaroo commented
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 :)