accept negative number

This commit is contained in:
Samuel Laulhau 2016-05-28 16:49:37 +02:00
parent 925c3a2d55
commit 859b91cc89

View file

@ -88,7 +88,7 @@ angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$root
break;
case 'number':
scope.field.input_type = 'text';
scope.field.validateRegex = /^\d+$/;
scope.field.validateRegex = /^-?\d+$/;
break;
default:
scope.field.input_type = 'url';