message: feat(Form): stop validation when a rule fails
diff: @@ -151,36 +151,46 @@ export default createComponent({
  resolve();
  }
  - Promise.all(
  - this.rules.map(rule => {
  + let message;
  +
  + this.rules
  + .reduce(
  + (promise, rule) =>
  + promise.then(() => {
  + if (message) {
  + return;
  + }
  +
  if (rule.required && this.formValueEmpty) {
  - return Promise.resolve(rule.message);
  + ({ message } = rule);
  + return;
  }
  if (rule.validator) {
  const returnVal = rule.validator(this.formValue);
  if (returnVal === false) {
  - return Promise.resolve(rule.message);
  + ({ message } = rule);
  + return;
  }
  if (isPromise(returnVal)) {
  - return returnVal.then(
  - result => result === false && rule.message
  - );
  + return returnVal.then(result => {
  + if (result === false) {
  + ({ message } = rule);
  }
  + });
  }
  -
  - return Promise.resolve();
  - })
  - ).then(messages => {
  - messages = messages.filter(item => item);
  -
  - if (messages.length) {
  - this.validateMessage = messages[0];
  + }
  + }),
  + Promise.resolve()
  + )
  + .then(() => {
  + if (message) {
  + this.validateMessage = message;
  resolve({
  name: this.name,
  - messages,
  + message,
  });
  } else {
  resolve();
  