Commit graph

135 commits

Author SHA1 Message Date
Alexandre Gomes Gaigalas
fdee9a9f7f Update URLs that changed 2026-02-11 20:24:00 +00:00
Alexandre Gomes Gaigalas
0b81dcb4f7 Update README.md and README.md-linked headline docs
The phrase "granularity control for advanced reporting" is not
accurate anymore. Although we offer much better exception handling
now, we are currently not offering granularity control at a global
level (previously implemented by the check() interface).

If that were to be changed, we can restore that headline. I instead
replaced with the phrase "Advanced exception handling", which
accurately describes what we offer.

I also removed the `concrete-api.md`, which was a document
describing how we don't rely on static calls. We do, in fact,
recommend some of them, such as `ValidatorBuilder::init`, and
although they can be avoided, it relies on setting up a custom
container which we do not offer full documentation for yet.
2026-02-01 22:46:02 +00:00
Henrique Moody
d1d8980ff9
Use awesome-pages to customize the menus
We tried using `mkdocs-nav-weight` but it turned out quiet limited. Not
only we have to add specific frontmatter to the Markdown files, but we
could also not hide and sort directories.

This commit introduces awesome-pages, which allows us to customize the
order of pages and not list the content of the "validators" directory in
the left menu.
2026-01-26 12:26:06 +01:00
Alexandre Gomes Gaigalas
d9cdc118b2 Introduce REUSE compliance
This commit introduces REUSE compliance by annotating all files
with SPDX information and placing the reused licences in the
LICENSES folder.

We additionally removed the docheader tool which is made obsolete
by this change.

The main LICENSE and copyright text of the project is now not under
my personal name anymore, and it belongs to "The Respect Project
Contributors" instead.

This change restores author names to several files, giving the
appropriate attribution for contributions.
2026-01-21 06:28:11 +00:00
Henrique Moody
098c973a2a
Add GitHub action to lint documentation files
When we make changes to the category of a validator, it's easy to forget
to update overall list of validators. This commit a GitHub actions that
will run a console command to check if the documentation it up-to-date.

The job will fail when we need to change the document, but the console
command will fix the issues, so there isn't a lot of friction there.
2026-01-13 23:37:05 -07:00
Henrique Moody
35ea95c6f0
Remove number prefixes from Markdown files
We used to have those to preserve the order of the pages when generating
the documentation with MkDocs. This commit introduces the
`mkdocs-nav-weight`, that allows us to make that order without having
those prefixes.
2026-01-07 14:46:06 +01:00
Henrique Moody
54ac76adce
Rename Rule to Validator
The name "rule" has always been confusing to me. It can be when you talk
about "validation rules", but it’s a very verbose way to describe it,
and it doesn’t work all the time.

This commit will rename the interface `Rule` to `Validator`, but it will
also rename the concept of "rule" to "validator".
2026-01-05 17:36:34 +01:00
Henrique Moody
3833ad70f8
Improve the "Feature Guide" documentation
Because the document was quite big already, I split the exception
handling part to another document.
2024-12-05 00:21:34 +01:00
Henrique Moody
061a3c9c09
Rename method "validate()" to "isValid()"
The method has been renamed some time ago, but I haven't updated the
documentation to cause less confusion. Now that I want to start updating
the documentation, I switched the default branch on GitHub to the latest
stable version, so I assume there will be less confusion in the
documentation, and I can start updating the docs for the next version.
2024-12-02 22:11:57 +01:00
Henrique Moody
8dab012d3f
Update URL of build status image
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2024-03-07 01:52:38 +01:00
Henrique Moody
fcb6ea5fdb
Fix broken documentation links
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2024-02-19 11:34:26 +01:00
Alexandre Gomes Gaigalas
a3e016bec9 Fix docs links 2023-02-18 15:29:37 -03:00
Alexandre Gomes Gaigalas
1e96fd1473 Update docs (and shiny badges) 2023-02-14 22:39:19 -03:00
Henrique Moody
80ff37ca7f
Configure continuous integration with GitHub actions
This commit will also remove Travis and Scrutinizer and will configure
Codecov as a code coverage tool.

A few changes in the PHPUnit configuration already had to be made
before, but became more visible now. They're along with this commit.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2020-08-27 19:06:37 +02:00
Henrique Moody
96116e0ff6
Remove current disclaimer about current stable version
As I'm about to release version 2.0, that disclaimer won't be necessary
anymore.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2020-04-04 23:28:32 +02:00
Henrique Moody
1dace92e89
Simplify "README.md" file
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-23 16:27:51 +02:00
Henrique Moody
1b0be4c3a6
Remove documentation links in the repository
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-23 16:16:00 +02:00
Henrique Moody
32d796ed3d
Add warning about the stable version
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-22 21:16:57 +02:00
Henrique Moody
6a52b63bbb
Remove duplication amoung documentations
There is quite some duplication between the "README.md" file and the
"docs/index.md". This commit will separate what belongs to the
documentation and what is specific of the repository.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-22 21:07:26 +02:00
Henrique Moody
d2d4728883
Increase the number of rules we have in README.md
At this point, Validation has 151 available rules.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-04-06 23:46:25 +02:00
Henrique Moody
4354652195
Merge branch '1.1' 2018-08-23 02:12:44 +02:00
Henrique Moody
52614d600d
Organize documentation for "Read the Docs"
The current documentation is hosted via GitHub pages rendered by
"Couscous". Every time we need a new version of the documentation
published we need to manually execute the "couscous".

This commit reorganize the documentation to be published to
"Read the Docs" because it will also allow us to have documentations per
version of the library most importantly provider a search field for the
documentation.

The documentation will be then published on:
https://respect-validation.readthedocs.io/

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-08-23 01:59:39 +02:00
Henrique Moody
5c598cdce2
Revert "Add link to support issues."
This reverts commit 62e1170a21.
2018-05-19 16:17:52 +02:00
Nick Lombard
62e1170a21
Add link to support issues.
Added link issues filtered by label support
2018-04-22 01:33:48 +02:00
Henrique Moody
9350d464ce
Update "Installation" document
Also remove duplication of supported PHP version.
2017-03-28 11:35:48 +02:00
Henrique Moody
00d300f762
Add changelog to rules' documentation
Also:
- Create documentation for `Base` rule;
- Increase number of rules
2017-03-28 11:22:58 +02:00
Henrique Moody
667f0fe989
Update documentation about supported PHP version 2017-03-14 10:00:48 +01:00
Henrique Moody
e708edd005
Rename rule "Numeric" to "NumericVal" 2016-11-06 18:45:44 +01:00
Henrique Moody
0512ff4866
Drop support for HHVM and PHP 5.6
Also make some improvements on .travis.yml file.
2016-11-05 13:20:07 +01:00
Henrique Moody
bc190e0eb0 Drop support for PHP <5.6 2016-05-06 11:12:56 +02:00
Henrique Moody
66027b85a5 Documentation improvements
- Add a space after comments with `//`;
- Add missing "See also" sections in some files
2015-10-19 22:55:05 -02:00
Henrique Moody
15ce71a578 On documentation, bump supported version to 5.4 2015-10-17 14:56:26 -03:00
Henrique Moody
c6dcba9fac Create "CHANGELOG.md" file 2015-10-07 02:56:23 -03:00
Henrique Moody
a0382f7af4 Update some files permissions
Some files were defined as executable but they should not be
2015-07-21 11:22:33 -03:00
Henrique Moody
75bf071ac9 Replace validators quantity on README.md 2015-07-20 17:37:53 -03:00
Henrique Moody
6dda44ce36 Add PHP and HHVM supported versions on docs 2015-02-26 18:01:48 -03:00
Henrique Moody
f2292312bc Add "CONCREATE_API.md" to repository
This file was create by Alexandre Gaigalas, I just add this to the
repository.
2015-02-12 15:07:10 -02:00
Henrique Moody
f422020d0e Update documentation 2015-02-12 14:37:33 -02:00
Henrique Moody
2914eba595 Merge pull request #176 from henriquemoody/namespace
Allow to define custom rule's namespaces/prefixes.
2015-02-11 12:43:59 -02:00
Henrique Moody
a4cb20810d Create a Factory to create rules
It also provide a way to define namespaces/prefixes to use the custom
rules on Respect\Validation.
2015-02-11 11:35:19 -02:00
Henrique Moody
d6855c0722 Improve date and time handling on "Max" rule 2015-02-11 11:18:39 -02:00
Henrique Moody
4c4c3d4c25 Create "Type" rule 2015-02-02 16:43:14 -02:00
Andy Wendt
ab65035181 Issue #260: Now using Respect\Validation exceptions only
* `ExceptionInterface`: all Respect\Validation\Exceptions implement through inheritance
* `ValidatorExceptionInterface`: implemented only by AllOfException.  This allows the end users to know when there has been a Validator exception rather than just any of our exceptions.

Fixed formatting issues

Created two new exception types

* Created ValidationExceptionInterface
* Created NestedValidationExceptionInterface which extends ValidationExceptionInterface
    * Renamed from ValidatorExceptionInterface

* ValidationException implements ValidationExceptionInterface and ValidationExceptionTest checks for the implementation.
* AbstractNestedException implements NestedValidationExceptionInterface and AbstractNestedExceptionTest checks for the implementation.

* CheckExceptionsTest now checks all Rule exceptions to make sure they implement ValidationExceptionInterface
* ValidatorTest now contains test that shows that only ValidationExceptionInterface can be used reliably with `::check()`

* Updated documentation for new exception types
* Reworked examples to show how to catch the exception interfaces

Minor changes in readme.md and ExceptionInterfaces

* Removed `import` statements (hahaha)
* Renamed `$e` to `$exception`

* `ValidationExceptionInterface` now extends `ExceptionInterface`.  Changed `ValidationException` to match
2015-01-31 07:59:59 -07:00
Henrique Moody
8c6390ed02 Update rules' documentations 2015-01-29 10:51:53 -02:00
Henrique Moody
74b41c74fa Update "README.md" file
- Fix wrong titles
- Remove deprecated validators
- Sort validators appendix alphabetically
- Update Markdown syntax for titles
- Update number of existing validators
2015-01-27 11:23:16 -02:00
Henrique Moody
e20ddce185 Create "Url" rule 2015-01-27 10:43:00 -02:00
Henrique Moody
a0e7e834fb Create "FilterVar" rule 2015-01-26 11:25:26 -02:00
Henrique Moody
27d1f8f7e8 Display badges from master branch only 2015-01-24 01:49:31 -02:00
Henrique Moody
81cfba9a6c Merge pull request #247 from henriquemoody/when
Allow to use `when()` rule without else
2015-01-23 02:53:21 -02:00
Henrique Moody
8b369fae97 Create "False" rule 2015-01-23 02:46:18 -02:00