Skip to content

[WIP] Documenting the Validator component #3710

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

Closed
wants to merge 4 commits into from

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Mar 23, 2014

Q A
Doc fix? no
New docs? yes
Applies to 2.3+
Fixed tickets #958

I started documenting one of the last missing components (only
BrowserKit needs some love after this).

This might become just another refactoring of the documentation, since
it'll duplicate a lot of book/validation. I don't think it's a problem
if we do the same thing as we did with the translation documentation?
(that was a test, but I think it has gone well?)

Todo

  • Moving the definition part from the book chapter
  • Writing about validating values (including how to deal with
    violations, like translation, presentation, debugging, etc.)
  • Fix the book chapter

Todo after this PR is merged (will be transformed into issues)

/cc @ricardclau, @webmozart

You can install the component in 2 different ways:

* :doc:`Install it via Composer </components/using_components>` (``symfony/validator`` on `Packagist`_);
* Use the official Git repository (https://github.com/symfony/Validator).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we doing everywhere the https:// and not the git@github.com? just curious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using git@github.com requires setting up SSH for your account, which does not provide any value when accessing public reposiitories in a read-only way (it used to be reserved to collaborators btw, but I think this has changed)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah and it is far a better practice to get people into contributing and learning. We shouldn't assume all are read-only people 👶

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the component repos are read-only, so it's only for read-only people. And if you want to contribute, you look into the contributing docs and not this docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the https url is not a read-only URL either (and anyway, even contributors should not push to the symfony repo directly but to their fork, as everything goes through PRs even for the core team)

-----

The Validator component allows you to use very advanced validation rules, but
it is also really easy to do easy validation tasks. For instance, if you want
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say "do easy validation tasks with it"... Don´t you think the sentence is a bit weird right now?

@ricardclau
Copy link
Contributor

Nice work so far! I am embarrassed I never found the time to do it, thanks for the big effort @wouterj

Just added some stylistic comments and typos. I am not native, though, so happy to discuss and obviously feel free to refuse any of my proposals

@wouterj
Copy link
Member Author

wouterj commented Mar 25, 2014

I'm happy to see you back here, @ricardclau ! I'll look at your comments later this week.

@ricardclau
Copy link
Contributor

I am about to finish a very intense side project that has kept me busy longer than I expected... let´s hope I can contribute again from time to time! Again, feel free to reject / accept any of my comments, most of them are just rephrasing and things like that, and maybe they will clash with the current style of the documentation.

@xabbuh
Copy link
Member

xabbuh commented Jun 18, 2014

@wouterj What's the state here?

@wouterj
Copy link
Member Author

wouterj commented Jun 18, 2014

In queue.

I've not forgotten this one, but there are more important things to do. The validator component already has a great doc in The Book.

@xabbuh
Copy link
Member

xabbuh commented Jun 18, 2014

Alright. Let me know if I can help you with this.

@wouterj
Copy link
Member Author

wouterj commented Mar 7, 2015

Closing, I don't see any time or motivation to work on this in the coming time. If anyone wants to take it over, feel free to base on this PR (I'll leave the branch in my fork).

@wouterj wouterj closed this Mar 7, 2015
@cordoval
Copy link
Contributor

cordoval commented Mar 7, 2015

sorry to hear this is not continued ⌛

@mickaelandrieu
Copy link
Contributor

@wouterj I will continue your work, big thanks !

@mvhirsch
Copy link
Contributor

@mickaelandrieu What is the current state of the documentation?

@mickaelandrieu
Copy link
Contributor

@mvhirsch I will start a real work on saturday based on @wouterj contribution. This is huge and I prefer take the required time before submit any pull request ;)

@mvhirsch
Copy link
Contributor

@mickaelandrieu I'm glad to hear that, thank you very much!

@javiereguiluz
Copy link
Member

@mickaelandrieu my advice would be to not make everything in one pull request. Even Wouter, who is used and loves to write documentation, abandoned this one. Remember that having some docs is better that having none :)

@OskarStark
Copy link
Contributor

thank you @mickaelandrieu

@mickaelandrieu
Copy link
Contributor

@javiereguiluz yeah, I know but I'm pretty sure nothing will be accepted if it is incomplete :/

If you have time for it, I will (realy) appreciate a pre-validation from you before push any contribution :)

@javiereguiluz
Copy link
Member

@mickaelandrieu I would gladly help you. Sadly, I can't help you because I don't have enough experience with the Validator and Form components, so I don't understand them.

@wouterj
Copy link
Member Author

wouterj commented Aug 27, 2015

@mickaelandrieu the complete task of writing Validator component docs can be split into a couple seperate PRs without being incomplete. For instance, a good first step would be to have the standard Introduction + Installation sections and some docs to set up the Validator, referencing the book article for the other information. In a next PR, some sections from book can be moved to the components docs.

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

Successfully merging this pull request may close these issues.

9 participants