Refactor colorCode validation in PrefixSchema to allow any length string starting with "§"
SteamWarCI Build 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/>.
|
* 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({
|
export const PrefixSchema = z.object({
|
||||||
name: z.string().startsWith("PREFIX_"),
|
name: z.string().startsWith("PREFIX_"),
|
||||||
colorCode: z.string().length(2).startsWith("§"),
|
colorCode: z.string().startsWith("§"),
|
||||||
chatPrefix: z.string(),
|
chatPrefix: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user