ContainerControl.Validate Método
Definición
Comprueba el valor del control que ha perdido el foco haciendo que los eventos Validating y Validated se produzcan, en ese orden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order.
Sobrecargas
Validate() |
Comprueba el valor del control que ha perdido el foco haciendo que los eventos Validating y Validated se produzcan, en ese orden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order. |
Validate(Boolean) |
Comprueba el valor del control que está perdiendo el foco; dependiente condicionalmente de si se activa la validación automática.Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on. |
Validate()
Comprueba el valor del control que ha perdido el foco haciendo que los eventos Validating y Validated se produzcan, en ese orden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order.
public:
bool Validate();
public bool Validate ();
member this.Validate : unit -> bool
Public Function Validate () As Boolean
Devoluciones
true
si la validación es correcta; en caso contrario, false
.true
if validation is successful; otherwise, false
. Si se llama desde los controladores de eventos Validating o Validated, este método siempre devolverá false
.If called from the Validating or Validated event handlers, this method will always return false
.
Comentarios
El Validate método valida el último control secundario que no se valida y sus antecesores, pero no incluye, el control contenedor actual.The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. Esta versión sobrecargada siempre realiza la validación, independientemente del valor de la AutoValidate propiedad del elemento primario del control.This overloaded version always performs validation, regardless of the value of the AutoValidate property of the control's parent. Por lo tanto, úselo para forzar la validación de forma incondicional.Therefore use it to unconditionally force validation.
Consulte también:
Validate(Boolean)
Comprueba el valor del control que está perdiendo el foco; dependiente condicionalmente de si se activa la validación automática.Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on.
public:
bool Validate(bool checkAutoValidate);
public bool Validate (bool checkAutoValidate);
member this.Validate : bool -> bool
Public Function Validate (checkAutoValidate As Boolean) As Boolean
Parámetros
- checkAutoValidate
- Boolean
Si true
, el valor de la propiedad AutoValidate se usa para determinar si se debería realizar la validación; si false
, se realiza la validación incondicionalmente.If true
, the value of the AutoValidate property is used to determine if validation should be performed; if false
, validation is unconditionally performed.
Devoluciones
true
si la validación es correcta; en caso contrario, false
.true
if validation is successful; otherwise, false
. Si se llama desde los controladores de eventos Validating o Validated, este método siempre devolverá false
.If called from the Validating or Validated event handlers, this method will always return false
.
Comentarios
El Validate método valida el último control secundario que no se valida y sus antecesores, pero no incluye, el control contenedor actual.The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. Esta versión sobrecargada realiza la validación en función de las siguientes condiciones:This overloaded version performs validation based on the following conditions:
Si el
checkAutoValidate
parámetro estrue
, la validación siempre se produce para los controles secundarios que no se validan.If thecheckAutoValidate
parameter istrue
, validation always occurs for child controls that are not validated.Si el
checkAutoValidate
parámetro esfalse
, la validación se produce solo AutoValidate si está habilitada la propiedad del elemento primario del control.If thecheckAutoValidate
parameter isfalse
, validation occurs only if the AutoValidate property of the control's parent is enabled.