小编kas*_*tom的帖子

FormGroup 表单错误为 null Angular Reactive Forms

使用 Reactive Forms 时,包含无效的 FormControl(无效表单)的 formGroup 显示为无效,这是正常的,但不包含任何错误。

我应该能够从 formGroup.errors 中的表单中获取所有错误,但它为空

但是,表单状态无效,并且在每个无效的 formControl 下,它都会给我验证错误我错过了什么?

检查错误:

import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from "@angular/forms";
import { DB1 } from 'src/app/interfaces/IDB';
import { DBS } from 'src/app/consts';
@Component({
  selector: 'app-new-dashboard',
  templateUrl: './new-dashboard.component.html',
  styleUrls: ['./new-dashboard.component.scss']
})
export class NewDashboardComponent implements OnInit {
  dbs: string[] = ["DB1", "DB2"]
  selectAxisOptions:string[]  = []
  newDashboardForm = new FormGroup({
    name: new FormControl(null, [Validators.required]),
    db: new FormControl(null, [Validators.required]),
    axis: new FormControl({ value: null, …
Run Code Online (Sandbox Code Playgroud)

angular

11
推荐指数
2
解决办法
8448
查看次数

在AWS中使用liquibase更新MySQL 5.6.40 DD

我刚在AWS中创建了一个DB MySQL 5.6.40.我可以使用Sequel Pro 1.1.2连接到数据库

这是我在pom.xml文件中的配置:

<plugin>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-maven-plugin</artifactId>
  <version>3.5.3</version>
  <configuration>
    <changeLogFile>src/main/resources/datamodel/liquibaseChangeLog.xml</changeLogFile>
    <driver>com.mysql.jdbc.Driver</driver>
    <url>pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com</url>
    <username>pradera</username>
    <password>AzSWMdlckdstgs0aed</password>
  </configuration>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <goals>
        <goal>updateSQL</goal>
      </goals>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.27</version>
    </dependency>
  </dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)

但是当我跑 mvn clean package -DskipTests

我收到了这个错误:

错误]无法执行目标org.liquibase:liquibase-maven-plugin:3.5.3:updateSQL(默认)项目icrypts:设置或运行Liquibase时出错:liquibase.exception.DatabaseException:liquibase.exception.DatabaseException:Connection not not not使用驱动程序com.mysql.jdbc.Driver创建pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com.可能是给定数据库URL的错误驱动程序 - > [帮助1] [错误]

mysql liquibase amazon-web-services amazon-rds spring-boot

5
推荐指数
1
解决办法
113
查看次数