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

Documenting Custom Rules #551

Closed
1 task done
MissaelAnda opened this issue Nov 8, 2022 · 1 comment
Closed
1 task done

Documenting Custom Rules #551

MissaelAnda opened this issue Nov 8, 2022 · 1 comment

Comments

@MissaelAnda
Copy link
Contributor

  • I've read the documentation and I can't find details on how to achieve this.

It would be cool if custom rules could be documented with description and example.

This:

/**
 * @description This rule validates something
 * @example "This:Is:An:Example"
 */
class CustomRule implements Rule
{
    //
}

Produces:
imagen

@shalvah
Copy link
Contributor

shalvah commented Nov 8, 2022

Good idea. PRs welcome.

I'd prefer a static docs method, though. It's simpler to implement and avoids us having to parse the annotation text, which can get tricky.

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

No branches or pull requests

2 participants