/*
- * Copyright (C) 2022 Free Software Foundation
+ * Copyright (C) 2024 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
final String[] requiredFields = {"companyName"}; //NOI18N
// Pre-validation (example: not null, not a string, empty string ...)
- super.preValidate(context, component, value, requiredFields, false);
+ super.preValidate(context, component, value, requiredFields, Boolean.FALSE);
// Convert name to string (now securely checked in BaseStringValidator)
final String companyName = (String) value;
// Default is to check on existing names
Boolean checkExisting = Boolean.TRUE;
- // Is attribute "allowEmptyValue" set?
+ // Is attribute "checkExisting" set?
if (component.getAttributes().containsKey("checkExisting")) { //NOI18N
// Get attribute
final Object attribute = component.getAttributes().get("checkExisting"); //NOI18N
}
// Securely cast it
- checkExisting = Boolean.parseBoolean((String) attribute);
+ checkExisting = Boolean.valueOf((String) attribute);
}
// Check if name is already used