passbolt/passbolt_api · error · CakeException
The data entered are not correct
Error message
The data entered are not correct
What it means
AccountCreationController::getAndValidateData runs the WebInstaller account creation form (AccountCreationForm::execute) against the POSTed data and throws a generic CakeException 'The data entered are not correct' when execute() returns false. The per-field errors are stored on the form and exposed to the template via formExecuteResult, but the exception itself carries no details.
Solutions
- Inspect the re-rendered form page / formExecuteResult for the specific field validation errors.
- POST a complete payload: username (valid email), first_name, last_name, and required account fields.
- Correct the username to a valid, non-conflicting email address.
- Re-run the WebInstaller step in the browser UI instead of crafting manual requests.
Example fix
// before curl -d 'username=not-an-email' .../install/account_creation // after curl -d 'username=admin@example.com&first_name=Ada&last_name=Lovelace' .../install/account_creation
Defensive patterns
Strategy: validation
Validate before calling
const data = { username, first_name, last_name };
const emailRe = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRe.test(data.username)) throw new Error('username must be a valid email');
for (const k of ['username', 'first_name', 'last_name']) {
if (!data[k] || !String(data[k]).trim()) throw new Error(k + ' is required');
} Type guard
function isValidAccountPayload(d) {
return d && typeof d.username === 'string' && /@/.test(d.username) &&
typeof d.first_name === 'string' && d.first_name.trim().length > 0 &&
typeof d.last_name === 'string' && d.last_name.trim().length > 0;
} Try / catch
try {
await post('/install/account_creation', payload);
} catch (e) {
if (String(e.message).includes('The data entered are not correct')) {
// re-fetch the step HTML / formExecuteResult to read per-field errors
}
throw e;
} Prevention
- Fill every required field; use a valid, unique email as username.
- Submit the installer through its own UI/form encoding, not hand-built bodies.
- Check the returned form page for field-level errors before retrying.
When it happens
Trigger: POSTing the WebInstaller account creation step (indexPost) with a username that is not a valid email, missing username/first_name/last_name, or any field failing AccountCreationForm validation rules.
Common situations: Empty profile fields in the installer UI; invalid or already-used email; scripting the installer with a malformed payload; CSRF issues causing empty POST data.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- The data entered are not correct
- The data entered are not correct
- The data entered are not correct
- The data entered are not correct
- The data entered are not correct
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/2abc3fc8f1dbf843.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltCe/WebInstaller/src/Controller/AccountCreationController.php:125
$this->webInstaller->setSettingsAndSave('first_user', $data);
$this->goToNextStep();
}
/**
* Get and validate the posted data.
*
* @throws \Cake\Core\Exception\CakeException If the user is not valid
* @return array
*/
protected function getAndValidateData()
{
$data = $this->request->getData();
$accountCreationForm = new AccountCreationForm();
$isValid = $accountCreationForm->execute($data);
$this->set('formExecuteResult', $accountCreationForm);
if (!$isValid) {
throw new CakeException(__('The data entered are not correct'));
}
return [
'username' => $data['username'],
'profile' => [
'first_name' => $data['first_name'],
'last_name' => $data['last_name'],
],
];
}
}
View on GitHub (pinned to 31c1bbc10f)