Hi,
How to do Php Security check for input user fields and input user treatment(please if you can solve example1+2)?
Example1: check if user insert url or something else:
<label>url: </label>
<input type="text">
Example2: check if user insert html or something else
<label>paste html: </label>
<textarea></textarea>
thanks
...
I have a signup form where users kan enter their subdomain of choice when creating an account.
http://_________.ourapp.com
I want them to be able to enter valid characters on the __________ part above only. I'm using a text field for that.
Is there a function or some sort of pattern that exists for such situations? Spaces should be f...
Hi, I have number of checkboxes and another checkbox for "Select All"
I want to check if the user has selected at least one checkbox. Need modification in javascript
<script language="Javascript">
function doSubmit(){
function check_checkboxes()
{
checked=false;
var c = document.getElementsByTagName('INPUT');
for (var i = 1; i < c....
Hi,
Im trying to figure out via JS if invalid chars were entered in a textarea
I want to allow only this chars:
A-Za-z0-9 !#%&*()+-=,.?"';:/
If illegal chars were entered, I want to retrieve the bad chars, and trigger an error, i.e:
Invalid text, bad chars were written:
1) _
2) @
etc...
Thanks!
...
I have a ASP.NET MVC 2 webpage in which I render multiple PartialViews of the same type. Each partial view contains a Ajax-form for posting smth. The form consists of:
an input: EditorFor(m => m.content)
the validation for the input: ValidationMessageFor(m => m.Content)
The problem is that because there are more than 1 of these forms...
I have two input fields holidayDate and Description(id=tags)
<html>
<head>
<script type="text/javascript">
$(document).ready(function() {
$('#holidayDate').datepicker();
var availableTags = ["New years Day", "Martin Luther King Day","Groundhog Day", "Valentine's Day", "Washington's Birthday",
"Easter", "Earth Day", "National Arb...
I'm trying to write a regular that will check for numbers, spaces, parentheses, + and -
this is what I have so far:
/\d|\s|\-|\)|\(|\+/g
but im getting this error: unmatched ) in regular expression
any suggestions will help.
Thanks
...
I know email addresses are limited to 254 characters, but is there a single resource that outlines suggested maxlengths for common fields like contact information e.g. phone, city, etc?
It seems every project I work people just shoot from the hip on their proposed limits. I'm hoping to find a canonical reference, targeted to a specific ...
I am working on a ACH payment processor and was wondering if I can scope the drivers license field against some rules. Any ideas on this? Can I assume numbers only or anything else more like SSN
Thanks
...
We're trying to harden a WCF service that we use with an XBAP application and have some questions that we haven't been able to answer yet.
To give some background:
The communication between the application and service is over HTTPS. The user is authenticated using username/password. The data being sent/received is compressed (gzip) bi...
Is it a good practise to decouple input checking from a model and have it handled elsewhere, say by a controller? If so, how could this be done from an MVC or DDD standpoint?
...
Hi,
Is there any sql query validator in frontend side or in any language for validating the query syntax before executing in the database ?.In my current project i have to validate the the sql query in flex before it goes to back end ,coz it has to pass lot many layers before hitting database and the hitting the DB and coming back wit...
Hello
I have a situation where users can submit feedback through a textarea on a HTML page or JSP. This works fine and the text ends up in the database.
But, can anyone suggest any safeguards which could prevent somebody trying to submit malicious scripts which could possibly affect the page's behaviour?
I am aware of parsing the tex...
I was playing with asp.net mvc 2's DataAnnotation validation. It hookup to the client side validation very nicely. I really like that I can just define one sets of rules and be able to user it at both client and server side.
I am wondering if it is possible to do it with asp.net form.
The following code snippet shows how it is done, an...
Hi there I have a calculation application which I need to validate the fields to check if the values entered are numeric numbers and not alphanumeric. I have some ideas about the codes:
Please guide me if I have done anything wrong or seem noob as this is my first time trying out Swing.
private void jTextField1ActionPerformed(java.aw...
I have the following asp.net code:
<asp:TextBox CssClass="mf" runat="server" ID="mail1" Width="270" />
<asp:RequiredFieldValidator ID="rfv1"
runat="server"
ControlToValidate="mail1"
Display="Dynamic" />
Now I want to show an image (or text) if the v...
I have a "Sign up for email" user control consisting of an asp:TextBox, asp:Button, asp:RegularExpressionValidator. Nothing fancy. I'm seeing some garbage/sql injection addresses in the database suggesting the client-side validation may be bypassed. Investigation suggests that the server-side validation is also not firing.
When I set En...
i have a c program in which i am accepting 2 numbers as input.
How do i validate if input entered is numbers only and not characters.
void main()
{
int a,b;
printf("Enter two numbers :");
scanf("%d%d",&a,&b);
printf("Number 1 is : %d \n Number 2 is : %d",a,b);
}
[Edit] Added Sample Code
...
In the program written below how i can ensure that only integer value is entered?
And if character is entered the program should convert it to its ASCII equivalent and then add them and show output as number.
Please help me......
#include<stdio.h>
int main(int argc, char **argv)
{
int a,b,c;
printf("enter two numbers:-");
scanf("%d \...
I was trying out a simple program in c for validating user data. The program is supposed to identify whether a user entered character is a number, alphabet or a special character.
Somehow , the code identifies every kind of input character as a number. I have appended the code below, i'd be grateful if someone could kindly point out wh...