-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
validator/src/main/java/io/avaje/validation/core/NoOpValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package io.avaje.validation.core; | ||
|
||
import io.avaje.validation.adapter.ValidationAdapter; | ||
import io.avaje.validation.adapter.ValidationRequest; | ||
|
||
class NoOpValidator implements ValidationAdapter, ValidationAdapter.Primitive { | ||
|
||
public static final NoOpValidator INSTANCE = new NoOpValidator(); | ||
|
||
@Override | ||
public boolean validate(Object value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public Primitive primitive() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public boolean validate(boolean value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(byte value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(char value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(double value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(float value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(int value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(long value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public boolean validate(short value, ValidationRequest req, String propertyName) { | ||
|
||
return true; | ||
} | ||
} |