mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-27 16:40:50 +08:00
feat: improve registration validation
This commit is contained in:
19
src/main/java/com/openisle/exception/FieldException.java
Normal file
19
src/main/java/com/openisle/exception/FieldException.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.openisle.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Exception carrying a target field name. Useful for reporting
|
||||
* validation errors to clients so they can display feedback near
|
||||
* the appropriate input element.
|
||||
*/
|
||||
@Getter
|
||||
public class FieldException extends RuntimeException {
|
||||
private final String field;
|
||||
|
||||
public FieldException(String field, String message) {
|
||||
super(message);
|
||||
this.field = field;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user