Giter VIP home page Giter VIP logo

smoke's People

Contributors

adaniello avatar alfredobarron avatar dnlruzzo avatar lespilettemaxime avatar misaelrojas avatar mostrosonido avatar ryananthonydrake avatar stockholmux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smoke's Issues

Error Message

Please how do I change the default error message to my own error message

Question: Does Smoke supports custom validation?

I need to validate a form with a file input - MIME type and size of a selected file. I haven't found anything about validation of file inputs nor custom validation in the Smoke docs. So could I e.g. pass custom function to smkValidate()?

[Alert] - Can content be pull in dynamically?

Currently I see that the messages are baked into the Javascript. Is there a way to inject or target dynamic text? I would like those text to be accessible and translatable by the content team

thanks

Validate in Modal form

I seem to have a problem validating a form that is part of a bootbox dialog.
The smkValidate() always returns false/fails.

change license to LGPL

I would like to change the license since GPL 3.0 requires everything that uses Smoke to be under GPL 3.0 . LGPL is more suitable for libraries.

Looks fantastic? Any plans for an Angular directive?

Great job on this plugin! Do you have any plans to create an Angular port of this where the functionality could be encapsulated into a set of directives? Has anyone tried using this with Angular as is to see if there are any compatibility issues?

Alert not working

I'm trying to use the following and it doesn't work - it returns undefined and no alert is displayed? I'm using progress bar and that does work? Not sure what's wrong.

$.smkAlert({text:'Select a new Category"', type:'warning'});

Syntax error : radio and checkbox

Uncaught Error: Syntax error, unrecognized expression: input[name=project[type]]:checked

Line 120 must change from :
value = $("input[name=" + name + "]:checked").val();
to
value = $("input[name='" + name + "']:checked").val();

How do I destroy smoke.js ?

  if(!$("form").smkValidate()){
    return false;
  }

I want to destroy/disable smkValidate form fields temporarily. Is there a way to do it?

smokeCustomizeText ignores the last part of given text

Hi.

I found bug on smokeCustomizeText.

See the example below

$.smokeCustomizeText('some {@} text {@} here', [1, 2]);

it returns some 1 text 2. I think correct returned value is some 1 text 2 here.

It because, given text is split by {@}, but does not append the last item of split text.

Allow more characters in passwords

I am using the software for a small client project where my client has a more rigid password policy (she needs special characters like !/-%,. and alike).

I will send a pull request in case you think it's a useful addition.

DOes this work with form-horizontal ?

I'm using the following code

<div class="form-group">
 <label for="pdf-name" class="col-sm-3 control-label">Full Name</label>
 <div class="col-sm-9">
  <input required type="text" class="form-control" id="pdf-name" placeholder="Your full name">
 </div>
</div> 

All works fine apart from the appearance of the warning messages.
They appear as a tooltip below the input field, rather than as in your demos, by changing the colour of the input field and adding a coloured message beneath ?

Any thoughts on this please...

Italian Language

(function($){
    $.fn.smkValidate.Languaje = {
        it: {
            // Mensaje de error para los input vacíos
            textEmpty        : 'Campo obbligatorio',
            // Mensaje de error para el input email
            textEmail        : 'Inserire una email valida',
            // Mensaje de error para el input alphanumeric
            textAlphanumeric : 'Sono ammessi solo numeri e/o lettere',
            // Mensaje de error para el input number
            textNumber       : 'Sono ammessi solo numeri',
            // Mensaje de error para el input number range
            textNumberRange  : 'Il numero inserito deve essere maggiore di <b> {@} </b> e  minore di <b> {@} </b>',
            // Mensaje de error para el input decimal
            textDecimal      : 'Sono ammessi solo numeri decimali',
            // Mensaje de error para el input currency
            textCurrency     : 'Inserire un numero di valuta valido',
            // Mensaje de error para el input select
            textSelect       : 'Selezione obbligatoria',
            // Mensaje de error para el input checkbox y radio
            textCheckbox     : 'Selezione obbligatoria',
            // Mensaje de error para longitud de caracteres
            textLength       : 'Il numero di caratteri è uguale a <b> {@} </b>',
            // Mensaje de error para rango de caracteres
            textRange        : 'Il numero di caratteri deve essere maggiore di <b> {@} </b> e minore di <b> {@} </b>',
            // Mensaje de error para strongPass Default
            textSPassDefault : 'Minimo 4 caratteri',
            // Mensaje de error para strongPass Weak
            textSPassWeak    : 'Minimo 6 caratteri',
            // Mensaje de error para strongPass Madium
            textSPassMedium  : 'Minimo 6 caratteri con un numero',
            // Mensaje de error para strongPass Strong
            textSPassStrong  : 'Minimo 6 caratteri con un numbero ed una maiuscola'
        }
    };

    $.smkEqualPass.Languaje = {
        it: {
            // Mensaje de error para el input repassword
            textEqualPass    : 'I valori inseriti non coincidono'
        }
    };

    $.smkDate.Languaje = {
        it: {
            shortMonthNames : ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
            monthNames : ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"]
        }
    };

}(jQuery));

Single space character

When user enter space character in empty input, validation is not working.
How to prevent it?

Question - about project

Hi,
As many I am using smoke to validate our forms but I looking there is no release since 2016, and I want to know if this project still active?
Thanks,

$.smkPanel event bug

If you create two (or more) smkPanels at different times, the panel buttons (smk-full,smk-remove, and smk-min) will have the event handlers assigned multiple times.

$('#Panel1').smkPanel({ .. });
/* ... */
$('#Panel2').smkPanel({ .. });

In this example, if you click the smk-min button on the first panel, it will be cause the panel to open then immediately close.

The issue is that the event handlers are set for any element with the corresponding classes, not just to that particular panel.

Coordinate the range indication of the validation message of the number / Char rength

I think so,
Validation message want to change from "Greater than/Less than(GT/LT)" to "Greater than or equal to/Less than or equal to(GE/LE)".

I hold the risk that I surpass a limit value by adding/Subtracting 1 to an indication level every time or unit consistency cannot express.

examples:
now :
textNumberRange : 'The numerical range must be greater than <b> {@} </b> and less than <b> {@} </b>',

Change candidate:
textNumberRange : 'The numerical range must be range of <b>{@}</b> - <b>{@}</b> .',

and,code will simply.

thanks.

Here is the language file for German to implement, thx for this great plugin!

(function($){
$.fn.smkValidate.Languaje = {
de: {
// Fehlermeldung bei leeren Eingabefeldern
textEmpty : 'Hier ist eine Eingabe erforderlich',
// Fehlermeldung bei falschen Eingaben im Eingabefeld Email
textEmail : 'Bitte geben Sie eine gültige Emailadresse ein',
// Fehlermeldung in einem alphanumerischen Eingabefeld
textAlphanumeric : 'Hier können Sie nur Zahlen und/oder Buchstaben eingeben',
// Fehlermeldung beim Eingabefeld Nummern
textNumber : 'Hier können Sie nur Zahlen eingeben',
// Fehlermeldung beim Eingabefeld Nummernbereich
textNumberRange : 'Die Zahl muss grösser als {@} und kleiner als {@} sein',
// Fehlermeldung beim Eingabefeld Dezimalzahlen
textDecimal : 'Hier können Sie nur Dezimalzahlen eingeben',
// Fehlermeldung beim Eingabefeld Währung
textCurrency : 'Bitte geben Sie eine gültige Währungsgrösse ein',
// Fehlermeldung in einem Auswahl/Select-Feld
textSelect : 'Hier müssten Sie eine Auswahl treffen',
// Fehlermeldung für die Eingabefelder Checkbox und Radio
textCheckbox : 'Hier müssten Sie eine Auswahl treffen',
// Fehlermeldung beim Eingabefeld mit einer vorgebenen Anzahl an Zeichen
textLength : 'Dieses Feld erfordert eine Eingabe von {@} Zeichen',
// Fehlermeldung bei der Eingabe eines vorgegebenen Bereiches an Anzahl der Zeichen
textRange : 'Die Anzahl der Zeichen muss grösser als {@} und kleiner als {@} sein',
// Fehlermeldung für Passwortstärke (Voreinstellung)
textSPassDefault : 'Mindestens 4 Zeichen',
// Fehlermeldung für Passwortstärke (schwach)
textSPassWeak : 'Mindestens 6 Zeichen',
// Fehlermeldung für Passwortstärke (mittel)
textSPassMedium : 'Mindestens 6 Buchstaben und 1 Zahl',
// Fehlermeldung für Passwortstärke (stark)
textSPassStrong : 'Mindestens 6 Buchstaben, eine Zahl und ein Grossbuchstabe'
}
};
$.smkDate.Languaje = {
de: {
shortMonthNames : ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
monthNames : ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
}
};
}(jQuery));

Problem with Input number range

When I use the range 100-10000, I can not accept any number other than 100, 1000 and 10000. In addition, at http://alfredobarron.github.io/smoke/#/validate the range 2015-2020 allows entering number 202 and That is an error. I hope you can solve it. regards
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cuando uso el rango 100-10000 no me admite el ningún número que no sea 100, 1000 y 10000. Además en http://alfredobarron.github.io/smoke/#/validate el rango 2015-2020 permite entrar en número 202 y eso es un error. Espero lo puedan solucionar. Saludos Julio

Validar select2 con atributo multiple

Si agrego al select la opción multiple desajusta un poco los estilos y no me muestra los mensajes de validación:

<div class="form-group">
 <label for="tipo_acto_apoderado" class="control-label">Tipo de acto</label>
 <select name="tipo_acto_apoderado[]" class="form-control tipo_acto_apoderado" id="tipo_acto_apoderado" multiple data-style="form-control" required>
 <option></option>
 @foreach ($tiposActo as $tipoActo)
  <option value="{{ $tipoActo->id }}">{{ $tipoActo->nombre }}</option>
 @endforeach
 </select>
</div>

Image

Cuando quito la clase form-control del select se ve bien pero no valida el campo:

<div class="form-group">
 <label for="tipo_acto_apoderado" class="control-label">Tipo de acto</label>
 <select name="tipo_acto_apoderado[]" class="tipo_acto_apoderado" id="tipo_acto_apoderado" multiple data-style="form-control" required>
 <option></option>
 @foreach ($tiposActo as $tipoActo)
  <option value="{{ $tipoActo->id }}">{{ $tipoActo->nombre }}</option>
 @endforeach
 </select>
</div>

image

Muchas gracias :)

Empty field

if i use smk-type="decimal" in a input field it ask always about a decimal value. how can i manage if it is not required?

Alerts on expanded panel

Greetings!

As far as I see, alerts are not showing when a panel is expanded. Any trick to be able to see the alerts? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.