Validation rules for values

Abierto
#205 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, kotlin
Área
tooling

Línea de trabajo

No files, tests, or entry points are named in the issue. Start by locating the definitions for integer, float, and string types and the consumer or generation code; done means supporting min/max and regex constraints, documenting the regex flavor, and leaving enum, list, and boolean behavior unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Sometimes it would be nice to be able to specify some additional validation rules that restrict the basic types further.
For example if you use integer for a port value, it would be nice to be able to say min: 1 and max: 65535, or a regex for some string values.

So what I have in mind right now was exactly that. min and max for integer and float and regex or however called for string. enum, list, and boolean are probably already restricted enough per-se.

A consumer of the typing could then also generate according validation code.
In some languages you can define a type directly like that, other languages have annotations with such validation information, yet other languages can generate runtime validation code.

When adding this, please keep in mind to clearly document which regex flavor has to be used by both sides.

Lenguaje dominante
Kotlin
Estrellas
69
Forks
4
Merge medio
7 d 3 h
PR fusionados (30 d)
7

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de typesafegithub/github-actions-typing

Todos los issues de typesafegithub/github-actions-typing

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.