Prefix needed on Custom Validation Rules CP example.

Aberta
#1,612 4 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
1/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
45/100
Tipo de issue
Documentação
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
laravel, php
Domínio
documentation

Direção de pesquisa

Start with the Custom Validation Rules section at https://statamic.dev/validation#custom-rules and compare the YAML example with the CP illustration. Update the illustration so it shows the required App\Rules\ prefix in the CP example; done when both examples make clear that custom rules need the prefix. The issue has gone over 600 days without a recent comment.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Not sure how to put in a request to fix a docs illustration, since I don't have the tools to make a new illustration.

In the Custom Validation Rules docs the illustration fails to show the App\Rules\ prefix that should go on any custom rule, even when defining it in the CP. This prefix is shown in the YAML example, but by not appearing in the CP example it strongly implies the prefix is only needed in the YAML.

Wrong, the prefix is needed in the CP as well. I just spent half an hour fumbling to learn this. It would be nice if the illustration were fixed.

Thanks!

Linguagem predominante
PHP
Estrelas
133
Forks
405
Merge médio
1d 16h
PRs com merge (30d)
13

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de statamic/docs

Todas as issues de statamic/docs

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.