This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function phpRule_ValidarRut($rut) { | |
// Verifica que no esté vacio y que el string sea de tamaño mayor a 3 carácteres(1-9) | |
if ((empty($rut)) || strlen($rut) < 3) { | |
return array('error' => true, 'msj' => 'RUT vacío o con menos de 3 caracteres.'); | |
} | |
// Quitar los últimos 2 valores (el guión y el dígito verificador) y luego verificar que sólo sea | |
// numérico | |
$parteNumerica = str_replace(substr($rut, -2, 2), '', $rut); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |