Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change allowed characters for group name #3245

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/content/_assets/js/builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ function add_invalid_message(field_id, valid) {
);
} else if (field_id == 'g') {
message = $(
'<p class=\'invalid_field_message\'>Valid characters include a-z separated by \'.\'</p>'
'<p class=\'invalid_field_message\'>Valid characters for package names include a-z, A-Z, \'_\' and 0-9. Packages must be separated by \'.\' </p>'
);
}
div.append(warning_icon).append(message);
Expand All @@ -860,7 +860,9 @@ function add_invalid_message(field_id, valid) {

// Base package name
function validate_group_name() {
var valid_syntax = /^([a-z]+\.)*[a-z]+$/g; // Starts with a lowercase char and only contains letters and periods.
// Each group name package can contain letters (either lower or uppercase),
// numbers and underscores all separated by periods Eg: com.Acme.my_widget.v2
var valid_syntax = /^[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]*)+$/g;
var value = $('.starter_field[data-starter-field=\'g\'] input').val();
var valid = value == '' ? false : valid_syntax.test(value);
add_invalid_message('g', valid);
Expand Down
Loading