alfredobarron / smoke Goto Github PK
View Code? Open in Web Editor NEWSmoke form validation and components for Bootstrap
Home Page: http://alfredobarron.github.io/smoke
License: GNU Lesser General Public License v3.0
Smoke form validation and components for Bootstrap
Home Page: http://alfredobarron.github.io/smoke
License: GNU Lesser General Public License v3.0
I want to set the minimum password to 3 but now default minimum is 4. Thanks.
Please how do I change the default error message to my own error message
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()
?
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
I seem to have a problem validating a form that is part of a bootbox dialog.
The smkValidate() always returns false/fails.
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.
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?
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'});
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();
if(!$("form").smkValidate()){
return false;
}
I want to destroy/disable smkValidate form fields temporarily. Is there a way to do it?
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.
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.
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...
(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));
When user enter space character in empty input, validation is not working.
How to prevent it?
There is a way to put notification in the center without override the CSS ?
Would you welcome a pull request with translations of the comments to go along side the Spanish?
Hola , utilizo su plugin para hacer la validacion de un form, pero si el usuario introduce como password solo letras MAYUSCULAS , no las toma en cuenta como un caracter, aparece siempre el mensaje "Minimo 4 caracteres" si escribo algun numero o simbolo despues de cualquier numero de mayusculas (mayor a 4) el mensaje desaparece
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,
If you create two (or more) smkPanel
s 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.
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.
(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));
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
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>
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>
Muchas gracias :)
when I go into full screen mode and change the page it exits full screen mode for some reason. Any ideas why this might be?
Is there any way to get smoke to remove other alerts still in display before I issue another alert?
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?
Hi there,
Would it be possible to add the ability to dictate where a notification should appear, such as bottom-right, top-left etc?
Thanks.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.