Fixed URL checker with http prefix mandatory.

This commit is contained in:
Christian P. MOMON 2022-02-28 17:30:12 +01:00
parent 37853c40d9
commit 2b2f444c44

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Christian Pierre MOMON <christian@momon.org>
* Copyright (C) 2020-2022 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
@ -41,7 +41,7 @@ public class PropertyChecker
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 DATE = "^(\\d{4}-\\d{2}-\\d{2}|\\d{2}/\\d{2}/\\d{4}|\\d{2}/\\d{4})";
public static final String URL = "^(http(s)?://)?[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$";
public static final String URL = "^https?://[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$";
public static final String EMAIL = "^.*@.*$";
public static final String NUMERIC = "^\\d+$";
public static final String NUMERICS = "^\\d*(,\\d*)*$";