Validation of module 11


I need to validate the RUT (Chile), which is based on Module 11.

There is some way to perform this validation.

Thank you.


Dear Franco,

Please provide any substantive details to help you with your problem:

  1. The questionnaire.
  2. The question you want to validate.
  3. The validation rule you are trying to implement.

Make sure you are familiar with Syntax Guide section on our support page:

1 Like

Hola Franco,

Para el caso de Chile, a mí me funcionó este código:

String.Concat(“0K987654321” [(int) Enumerable.Range (0, (int) rutenc.Length - 1)
.Select (i =>
((i % 6) + 2) *
((long.Parse(rutenc.Left(rutenc.Length-1))/ (int) Math.Pow (10, i)) % 10))
.Sum () % 11]).ToUpper()==rutenc.Right(1).ToUpper()

Donde, rutenc es del tipo string “12345678k” o “12345678K”
Es una adaptación desde

Ruego responder en caso de encontrar error o versión más optimizada.

Felipe Pizarro