Class ReglaCajaTextoVacia
  Inherits ValidationRule
  Public Overrides Function Validate(value As Object, cultureInfo As System.Globalization.CultureInfo) As ValidationResult
    Dim n As Double
    If Double.TryParse(value.ToString(), n) Then
      Return New ValidationResult(False, "No puede ser un dato numérico")
    End If

    Dim contenido As String = TryCast(value, String)
    If contenido.Length = 0 Then
      Return New ValidationResult(False, String.Format("La cadena de entrada está vacía"))
    End If

    Return ValidationResult.ValidResult
  End Function
End Class
