Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Created August 18, 2022 22:53
Show Gist options
  • Select an option

  • Save codigoconjuan/46ad9f09fc8f4a46ee308c52a268af42 to your computer and use it in GitHub Desktop.

Select an option

Save codigoconjuan/46ad9f09fc8f4a46ee308c52a268af42 to your computer and use it in GitHub Desktop.
Gist Validación Ponentes
public function validar() {
if(!$this->nombre) {
self::$alertas['error'][] = 'El Nombre es Obligatorio';
}
if(!$this->apellido) {
self::$alertas['error'][] = 'El Apellido es Obligatorio';
}
if(!$this->ciudad) {
self::$alertas['error'][] = 'El Campo Ciudad es Obligatorio';
}
if(!$this->pais) {
self::$alertas['error'][] = 'El Campo País es Obligatorio';
}
if(!$this->imagen) {
self::$alertas['error'][] = 'La imagen es obligatoria';
}
if(!$this->tags) {
self::$alertas['error'][] = 'El Campo áreas es obligatorio';
}
return self::$alertas;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment