Refactor colorCode validation in PrefixSchema to allow any length string starting with "§"
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@ -17,11 +17,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {z} from "zod";
|
||||
import { z } from "zod";
|
||||
|
||||
export const PrefixSchema = z.object({
|
||||
name: z.string().startsWith("PREFIX_"),
|
||||
colorCode: z.string().length(2).startsWith("§"),
|
||||
colorCode: z.string().startsWith("§"),
|
||||
chatPrefix: z.string(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user