I am using a container from the Common Section and input fields from Bootstrap4 (Img 2)
The code that I am following is as follows:
Function Login_onshow()
InitLGValidation()
End Function
Function InitLGValidation()
Dim validateRules = { rules: {TxtLGEmail: { required: True, Email: True }, _
TxtLGPassword: "required", _
}, _
messages: {TxtLGEmail: "Se necesita un correo electrónico válido.", _
TxtLGPassword: "Introduce la contraseña"}, _
}
NSB.validation(CtLogin, validateRules)
End Function
Function BtnLGLogin_onclick()
$("#CtLogin").valid()
End Function
As I mention on my initial message, with all this setup, does not display the validation option in the NSB call. (Img 3)
Finally the error message that I receive when I execute the app (forcing the NSB.validation) when I do the click on the login button is the following (Img 4)
Finally I found the solution. The problem was in the container. By default, when you generate a container, the HTMLTag property (which by the way I do not know which is the purpose of it) comes with a “div” value by default.
In order to make this work, you need to change the value to “form”. I think it would be a good idea to include this detail in the wiki documentation for the validation functionality.