PageSourceSearch

https://henbuk.com/assets/js/validation.js

js henbuk.com collected 2026-10-08 03:29:18 UTC 752 bytes, 25 lines download raw bytes

1
2// validation handel ajax + laravel : https://gist.github.com/yaza-putu/0e8c13100e1ef9f29306c8c4ef07d3c1
3
4function handleValidation(messages)
5{
6    // reset before looping
7    $('.invalid-feedback').remove();
8    for(let i in messages)
9    {
10        for(let t in messages[i])
11        {
12            $('[name='+i+']').addClass('is-invalid').after('<div class="text-left invalid-feedback">'+messages[i][t]+'</div>');
13        }
14
15        // remove message if event key press
16        $('[name='+i+']').keypress(function(){
17            $('[name='+i+']').removeClass('is-invalid');
18        });
19
20        // remove message if event change
21        $('[name='+i+']').change(function(){
22            $('[name='+i+']').removeClass('is-invalid');
23        });
24    }
25}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.