Value Length (Min) fails to validate when field is empty?

19 Feb '14, 12:52 PM
13,823 Views
Forum Forum Starter - Level 2

Hi,

I've made a field with Value Length validation rule and set it to be 6 characters minimum but the field is not mandatory so when i leave it empty the validation fails ("the entered value length must be at least 6 characters"). I think this is incorrect behavior of this validation rule, it must pass the validation if the value is empty. So how do i make non-mandatory field with minimum length of 6 letters?

And with correct behavior if user wants it to be not empty and to have 6 letters minimum he would add a Mandatory validation rule along with Value Length.

PS: the workaround is to use such Regular Expression validation ^(?:.{6,}|)$ (where 6 is desired minimum length).

 
x 1
Follow
Answer Answer at this question and get points!
Forum Expert - Level 5

Perfect solution

 
x 0
Forum Expert - Level 5

Yes, regular expresion work fine in this situation

 
x 0
Forum Starter - Level 2

Thanks 8) But i still think that the behavior of Value Length validation rule is incorrect in this case. It must not do nothing (ignore) with empty fields.

 
x 0
Answer at this question and get points!

Related questions

Ajax and FCK Editor (WebRatio 5.x) Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Ajax on change selection field and modify units Autocomplete template Automatic date in form Automatic file upload BPMN: URL field ckeditor - change directory for the browser Clean a form Como crear cambio de contraseña Como tener dos botones juntos en un formulario independientes de una accion? Como usar la función autocomplete en un field Compare with the current time coupled mandatory fields Cryptic error when submitting a form Disabilitare campi durante evento AJAX Drop down menu question Dudas sobre modelado(Data Flow,Forms y Operation Create) Dynamic attribute/field names. Possible? Dynamic instantiation of fields on a page for any Class type Empty record mistakenly saved entry form logic. Entry Unit - Default field timestamp Entry Unity, Field Date Type Error Field as link soruce Form element Form template Getting the absolute path of a RTXBLOBData Hide form until a flow is triggered Hiding form components based on page conditions Hierarchy component How I can receive the primary key value after adding into database from OK Port. How to redirect to the correct site view after a successful login attempt input mask Multi Entry Unit: How to forward only checked rows? Multi-Image Upload Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Prelevare la chiave del record da una Selection Field in una Multiple Form Problem saving multi selection from input Progress bar when uploading big file(s) in a form? Pulire URL Redirecting users to another site view Resize fields Search by Selector component does not work selection fields on cascade Select multiple files for upload Setting Upload directory Showing items that have a relation with an entity Slot in Selection Field Update fields based on selection of other fields Updating attributes of an entity upload file and the move it to other location upload file html Uppercase Uso de la componente chart de webRatio Validacion validation fields WebRation - Create Navigation diagram What are the new features of WebRatio 6.1? which of these three models is closer to webratio/ifml way of creating web applications