Skip to content

Conversation

@ElMaxter99
Copy link
Owner

@ElMaxter99 ElMaxter99 commented Oct 29, 2025

Summary

  • add a GitHub Actions workflow that runs every test suite against Node.js 18 and 20
  • execute each functionality test file independently to spot regressions quickly

Testing

  • npm test

@ElMaxter99 ElMaxter99 merged commit bea944b into master Oct 29, 2025
12 checks passed
@ElMaxter99 ElMaxter99 deleted the alvaromaxter/expand-library-functionality-for-field-validation-9myf08 branch October 29, 2025 10:20
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +45 to +48
const evaluationContext = { value, row, context, rule };
const resolvedArgs = resolveTokens(rule.args ?? ['$value'], evaluationContext);
const result = await resolver(value, row, context, rule, resolvedArgs);
const normalised = normaliseExternalResult(result, rule);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass resolved custom rule args to resolver positionally

The custom validator resolves rule.args but then invokes the external resolver as resolver(value, row, context, rule, resolvedArgs), so the resolved tokens are only available inside an array passed as the fifth parameter. Resolvers written to consume the tokens positionally—such as cuentaHabilitadaParaAlta(cuenta, dni) in configs/external-checks.json—instead receive (value, row) and thus mis-evaluate valid rows (row 1 in that config is flagged even though the DNI and account are correct). The call site should spread the resolved arguments when invoking the resolver or otherwise map them to the expected positional parameters so that rule.args actually influences the validation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant