Bug 1688613 - Avoid duplicate error message for failed validation
Summary: Avoid duplicate error message for failed validation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.3.0
Assignee: cvogt
QA Contact: Ruchir Garg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-14 05:42 UTC by Yadan Pei
Modified: 2020-01-23 11:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: When the introduction of the Developer console, some forms have been overhauled. Some fields, such as the name, now use client side validation to provide immediate feedback for invalid values. Reason: Error messages from the server are often long and unclear. Result: Client side validation will show an inline error message for invalid name values.
Clone Of:
Environment:
Last Closed: 2020-01-23 11:03:45 UTC
Target Upstream Version:


Attachments (Terms of Use)
name validation error (17.49 KB, image/png)
2019-11-23 01:31 UTC, cvogt
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:04:13 UTC

Description Yadan Pei 2019-03-14 05:42:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
cluster version: 4.0.0-0.nightly-2019-03-13-233958
console commit: ddab4c4d3863f4472819b208493fae871968e641

How reproducible:
Always

Steps to Reproduce:
1. user create application from image following these steps
Catalog -> Developer Catalog -> php -> fill required fields and set Name as invalid inputs, such as R#%@TWTYGY -> hit Create


Actual results:
1. Long and duplicate error message shown on page:
Error "Invalid value: "r#%@twtygy": may not contain '%'" for field "metadata.name".; Error "Invalid value: "r#%@twtygy": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')" for field "metadata.name".; Error "Invalid value: "r#%@twtygy": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" for field "metadata.name".; Error "Invalid value: "r#%@twtygy": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" for field "metadata.name".; Error "Invalid value: "r#%@twtygy": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" for field "metadata.name".

Expected results:
1. Clear error message should be shown and only once

Additional info:

Comment 1 Samuel Padgett 2019-10-28 18:08:43 UTC
Updating to dev console since the code has moved. It looks like this might have been fixed indirectly since it was opened.

Comment 2 cvogt 2019-11-07 14:59:57 UTC
No longer reproducible as the forms have changed and include name validation that prevents the creation of the resource.

Comment 3 cvogt 2019-11-23 01:31:43 UTC
Created attachment 1638956 [details]
name validation error

Comment 4 cvogt 2019-11-23 01:32:12 UTC
Verified on: https://openshift-release.svc.ci.openshift.org/releasestream/4.3.0-0.ci/release/4.3.0-0.ci-2019-11-22-122829

Firefox: 68.2.0esr

As noted previously, the name now has validation client side. See attached screenshot.

Comment 6 errata-xmlrpc 2020-01-23 11:03:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0062


Note You need to log in before you can comment on or make changes to this bug.