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

Can we validate arguments going into class methods? #115

Open
viztastic opened this issue Aug 25, 2017 · 1 comment
Open

Can we validate arguments going into class methods? #115

viztastic opened this issue Aug 25, 2017 · 1 comment
Labels
type: feature Issues related to new features.

Comments

@viztastic
Copy link

viztastic commented Aug 25, 2017

class AssetProvision {

      @IsNotEmpty()
      public addAsset(asset: Asset) {
               store(asset).in.database();
      }

}

I want to make sure that arguments going into the addAsset method are not null, is this possible with the @IsNotEmpty() decorator?

@NoNameProvided
Copy link
Member

Currently not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Issues related to new features.
Development

No branches or pull requests

2 participants