Required field validation is working fine in the interface and portal.
But in Site the same interface is not showing "A value is required"..
Discussion posts and replies are publicly visible
Can you share the Code snippet
a!textField( label: "First Name", labelPosition: "ADJACENT", placeholder: "Enter First Name", value: ri!accessDetails.firstname, saveInto: {ri!accessDetails.firstname}, refreshAfter: "UNFOCUS", required: true, validations: { if( isnull( cleanwith( ri!accessDetails.firstName, "1234567890" ) ), null, "Please enter a valid name" ), if( like(ri!accessDetails.firstname," "), "Please enter a valid name", null ) } )//For the text fielda!buttonLayout( primaryButtons: a!buttonWidget( label: "SUBMIT", value: 3, saveInto: { a!startProcess( processModel: cons!GMA_CALL_ACCESS_DETAILS_PM, processParameters: { accessDetails: ri!accessDetails } ) }, submit: true, size: "STANDARD", color: "ACCENT", validate: true ) )//For button
is it showing * sign on field (it should be according to code snippet) ?however your second logic for validation allows two or more spaces which looks like value is null but still our save into works and it does not shows validation on fieldcould you please provide more info like what data is coming into that field etc
Yes, that is also a problem, without values filled, SAVE INTO is working and empty fields are getting stored in DB.. It should not..For your question,.. we are saving the first name in that field
In your first validation "if" you wrote it as a accept null . Just correct it .
you can replace your like() condition with this
if( rept(" ",len(local!name) ) = local!name, "Please enter a valid name", null )
Thank you Amaan Shekh and Venky Avuluri
In this case you would not need to set "submit" to true (in fact you should probably set it to FALSE); keep the "validate" parameter set to true;