|
@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
|
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
+import javax.validation.constraints.Pattern;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -62,12 +63,14 @@ public class RemoteFireVO {
|
|
|
* 事件坐标(经度)
|
|
|
*/
|
|
|
@NotBlank(message = "事件坐标(经度)不能为空")
|
|
|
+ @Pattern(regexp = "^(\\-|\\+)?(((\\d|[1-9]\\d|1[0-7]\\d|0{1,3})\\.\\d{0,15})|(\\d|[1-9]\\d|1[0-7]\\d|0{1,3})|180\\.0{0,6}|180)$", message = "事件坐标(经度)取值范围只能在正负180之间,小数点后最多保留15位")
|
|
|
private String eventLongitude;
|
|
|
|
|
|
/**
|
|
|
* 事件坐标(纬度)
|
|
|
*/
|
|
|
@NotBlank(message = "事件坐标(纬度)不能为空")
|
|
|
+ @Pattern(regexp = "^(\\-|\\+)?([0-8]?\\d{1}\\.\\d{0,15}|90\\.0{0,6}|[0-8]?\\d{1}|90)$", message = "事件坐标(经度)取值范围只能在正负180之间,小数点后最多保留15位")
|
|
|
private String eventLatitude;
|
|
|
|
|
|
/**
|