Added Z support in DATETIME property check.

This commit is contained in:
Christian P. MOMON 2023-02-25 15:47:43 +01:00
parent ec9f8ede3c
commit ad7494c01f

View file

@ -39,7 +39,7 @@ public class PropertyChecker
public static final String BOM = "\ufeff"; public static final String BOM = "\ufeff";
public static final String COMMENT = "^#.*$"; public static final String COMMENT = "^#.*$";
public static final String STRING = "^.+$"; public static final String STRING = "^.+$";
public static final String DATETIME = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}([\\.,]\\d+)?)?([+-]\\d\\d:\\d\\d)?"; public static final String DATETIME = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}([\\.,]\\d+)?)?([+-]\\d\\d:\\d\\d|Z)?";
public static final String DATE = "^(\\d{4}-\\d{2}-\\d{2}|\\d{2}/\\d{2}/\\d{4}|\\d{2}/\\d{4})"; public static final String DATE = "^(\\d{4}-\\d{2}-\\d{2}|\\d{2}/\\d{2}/\\d{4}|\\d{2}/\\d{4})";
public static final String URL = "^https?://[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$"; public static final String URL = "^https?://[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$";
public static final String EMAIL = "^.*@.*$"; public static final String EMAIL = "^.*@.*$";