Pristine
Pristine copied to clipboard
Improve documentation
I spent a lot of time creating custom validators, later realizing that the same results could already be achieved with the standard validators. I have written some more realistic examples here: https://codepen.io/luca-vercelli/full/KKzMJvR
(please notice that the Pen points to the CDN https://combinatronics.com/Sha256/Pristine/master/dist/pristine.js )
I think the http://pristine.js.org/demo.html page could be reorganized that way:
- Common validations
- Real-world examples (@sha256 this could point to my Pen, or you could create a similar one)
- Custom validator to a specific field
- Custom global validator
and the example "Custom error messages" can be omitted.
Second issue, I think that the "Demo" link in README.md file should not be in a title, it took me a while to realize it was a link.
Third issue, the "API" section of the README.md file could be moved in a separate file.
If you agree, I could work on this.
@luca-vercelli, I think Real-world examples can be at #1 and point to the Pen you made. So the flow would be like this:
- Real world examples 2 - 5: General demo examples
I would suggest to keep "Custom error messages" example too because someone may need a quick example of how this can be done.
I agree with the Demo link. Also the text just below it, is misleading too.
But I think the API section is fine where it is, at least for now. The goal is to keep the readme file self sufficient. So you don't need to look into other places if you read it carefully.