I'm using VS 2005 with LLBLGen v2.0 with two class scenario (selfservice)
I've added the following code for the validation.
But if a i save my entity or when explicit validate the entity the code isn't executed.
Am i missing something?
Protected Overrides Function OnValidateFieldValue(ByVal fieldIndex As Integer, ByVal value As Object) As Boolean
Dim toReturn As Boolean = True
Select Case CType(fieldindex, MemberFieldIndex)
Case MemberFieldIndex.AssociationRegistrationCode
' id is valid if the value is <> KEES
toReturn = value.ToString <> "KEES"
Case Else
toReturn = True
End Select
If toReturn = False Then
SetEntityFieldError(MemberFields.AssociationRegistrationCode.Name, "Waarde mag niet KEES zijn", False)
End If
Return toReturn
End Function