Download the PHP package hnrazevedo/validator without Composer

On this page you can find all versions of the php package hnrazevedo/validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package validator

# Validator @HnrAzevedo

Maintainer Latest Version Scrutinizer Code Quality Build Status PHP from Packagist Total Downloads

The Validator is a simple data validation component. It can be used statically with a controller or together as middleware. Its author is not a professional in the development area, just someone in the Technology area who is improving his knowledge.

O Validator é um simples componente de validação de dados. Ele pode ser usado de forma estática com algum controlador ou em conjunto como middleware. Seu autor não é profissional da área de desenvolvimento, apenas alguem da área de Tecnologia que está aperfeiçoando seus conhecimentos.

Highlights

Installation

Validator is available via Composer:

or in at terminal

Documentation

For details on how to use the Validator, see the sample folder with details in the component directory

Para mais detalhes sobre como usar o Validator, veja a pasta de exemplos com detalhes no diretório do componente

Validation rules

Available rules

Languages

The system has been configured to support multiple languages, so make sure the desired language is in the languages folder and define it with the lang method before any procedure

O sistema foi configurado para suportar vários idiomas, então verifique se o idioma desejado se encontra na pasta languages e defina-o com o método lang antes de qualquer procedimento

NOTE

In case the field is an array, the rules will be tested in all its elements.

Em caso do campo ser um array, as regras serão testadas em todos seus elementos.

The validation rules must be defined in the construction of the class object with the namespace denified in the Validator

As regras de validação devem ser definidas na construção do objeto da classe com o namespace denifida no Validator

Data format for validation

The data for validation must be passed to the component as follows

Os dados para validação devem ser passados ​​para o componente da seguinte forma

Defining namespace

To use dynamically to avoid the need to place the entire namespace of a class with rules, you must define the namespace before performing data validation

Para utilização de forma dinamica para evitar a necessidade de colocar o namespace inteiro de uma class com regras, deve-se definir o namespace antes de executar a validação dos dados

Check data

Validation errors are returned in an error array, in case there are more than one occurrence, they can be displayed at the same time

Os erros de validação são retornados em uma matriz de erro, caso haja mais de uma ocorrência, eles podem ser exibidos ao mesmo tempo

toJson

Returns a readable Json for validation to be performed on the client side

Retorna um Json legível para validação a ser realizada no lado do cliente

Middleware

To use HnrAzevedo\Validator as middleware, it is necessary to define the following information in ServerRequest

Para utilizar o HnrAzevedo\Validator como middleware, é necessário definir as seguintes informações na ServerRequest

Support

Security: If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Se você descobrir algum problema relacionado à segurança, envie um e-mail para [email protected] em vez de usar o rastreador de problemas.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of validator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
hnrazevedo/http Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hnrazevedo/validator contains the following files

Loading the files please wait ....