Skip to content

Commit

Permalink
when your anti-idiot system catches you
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Sep 21, 2024
1 parent 3746ee2 commit 5bd66f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/src/main/java/revxrsal/commands/annotation/Length.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,20 @@

import org.jetbrains.annotations.Range;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* An annotation that requires {@link String} parameters to have size
* in the range of {@link Length#min()} and {@link Length#max()} (both inclusive)
* <p>
* <em>Note</em>: If a parameter has {@link #min()} == 0, it will automatically be
* marked as optional.
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface Length {

/**
Expand Down

0 comments on commit 5bd66f6

Please sign in to comment.