lab3
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.vnp.demo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
public record UserCreateRequest(
|
||||
|
||||
@NotBlank
|
||||
@Pattern(regexp = "^[a-z0-9_]{3,32}$")
|
||||
String username,
|
||||
|
||||
@JsonProperty("display_name")
|
||||
@NotBlank
|
||||
String displayName,
|
||||
|
||||
@NotNull
|
||||
String password
|
||||
) {}
|
||||
Reference in New Issue
Block a user