javax.validation Questions
6
I have a boolean field which I want to validate to have only "true" or "false" as value(without quotes). But this field is also allowing "true" or "false" as value(with quotes) which I want to rest...
Hastie asked 30/5, 2019 at 15:29
6
I keep getting validator error for quite simple configuration class
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stere...
Firstrate asked 19/1, 2018 at 11:56
4
I have defined a rest endpoint method as:
@GetMapping("/get")
public ResponseEntity getObject(@Valid MyObject myObject){....}
This maps request parameters to MyObject.
MyObject is defined as(wi...
Nebula asked 5/6, 2020 at 17:43
2
Solved
I'm trying to validate a bean using custom validator. But the validator needs info that is to be passed to it from the method where validate is invoked. Is there a way to do that?
I can't pass it ...
Tacye asked 25/6, 2019 at 17:48
5
Solved
Controller:
@RequestMapping(...)
public void foo(@Valid Parent p){
}
class Parent {
@NotNull // javax.validation.constraints.NotNull
private String name;
List<Child> children;
}
...
Peggie asked 13/6, 2019 at 11:38
4
Solved
I have a service method:
@GetMapping(path = "/api/some/path", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<?> getWhatever(@RequestParam(value = "page-number", default...
Smiga asked 5/6, 2019 at 20:50
1
Solved
I'm using Hibernate validator to validate my beans.
Actually I have this dependencies on my POM
<!-- Hibernate validator - Bean validation API Implementation -->
<dependency>
<g...
Vennieveno asked 18/10, 2018 at 16:10
1
Solved
I want to validate GET / POST request for spring-boot controller classes with the javax.validation-api annotations.
For classes @Valid and @NotBlank for attributes of that class work perfectly.
T...
Goatsbeard asked 28/8, 2018 at 12:56
1
© 2022 - 2024 — McMap. All rights reserved.