Skip to content

Commit c7d84e3

Browse files
committed
Use more specific labels for MISSING_REQUIRED_PROPERTY_VALUE error
1 parent 5f34302 commit c7d84e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

includes/validation/class-amp-validation-error-taxonomy.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,7 @@ public static function render_single_url_error_details( $validation_error, $term
21792179
if ( isset( $validation_error['meta_property_required_value'] ) ) {
21802180
printf(
21812181
' (%s: <code>%s</code>)',
2182-
esc_html__( 'required', 'amp' ),
2182+
esc_html__( 'required value', 'amp' ),
21832183
esc_html( $validation_error['meta_property_required_value'] )
21842184
);
21852185
}
@@ -3106,7 +3106,10 @@ public static function get_source_key_label( $key, $validation_error ) {
31063106
case 'sources':
31073107
return __( 'Sources', 'amp' );
31083108
case 'meta_property_name':
3109-
if ( AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_PROPERTY_IN_ATTR_VALUE === $validation_error['code'] ) {
3109+
if (
3110+
AMP_Tag_And_Attribute_Sanitizer::DISALLOWED_PROPERTY_IN_ATTR_VALUE === $validation_error['code'] ||
3111+
AMP_Tag_And_Attribute_Sanitizer::MISSING_REQUIRED_PROPERTY_VALUE === $validation_error['code']
3112+
) {
31103113
return __( 'Invalid property', 'amp' );
31113114
} elseif ( AMP_Tag_And_Attribute_Sanitizer::MISSING_MANDATORY_PROPERTY === $validation_error['code'] ) {
31123115
return __( 'Missing property', 'amp' );

0 commit comments

Comments
 (0)