NetTalk Central

Author Topic: Requiered Field Problem  (Read 4889 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Requiered Field Problem
« on: June 11, 2015, 05:47:33 PM »
hi i have 2 fields with mask with requiered check but don't validate this fields i need to add extra verification in
validate Insert like this:

if Cat:SeguroSocial = '' or NULL(Cat:SeguroSocial)
    loc:Invalid = 'Cat:SeguroSocial'
    if not loc:alert then loc:alert = p_web.translate('Seguro Social:'). !& ' ' & p_web.site.RequiredText.
    EXIT
END
if Cat:Telefono = '' or NULL(Cat:Telefono)
    loc:Invalid = 'Cat:Telefono'
    if not loc:alert then loc:alert = p_web.translate('Telefono:'). !& ' ' & p_web.site.RequiredText.
    EXIT
END

without picture in a field validate work perfect.

NT 8.42

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Requiered Field Problem
« Reply #1 on: June 11, 2015, 08:47:05 PM »
osquiabro,

try

if cat:SeguroSocial = '' or null( cat:SeguroSocial ) or deformat( cat:SeguroSocial, @p###-##-####p ) = ''

assuming @p###-##-####p is how your formatting your social.

Gregory C. Bailey

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Required Field Problem
« Reply #2 on: June 12, 2015, 04:56:55 AM »
hi lanmicro, with extra code i can validate the field, but NT don't validate a Required field's if have any picture..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Requiered Field Problem
« Reply #3 on: June 16, 2015, 02:10:06 AM »
Hi Osa,

What picture are you using?

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Requiered Field Problem
« Reply #4 on: June 16, 2015, 03:18:13 AM »
@p###-##-####p and  @p(###)-###-####p or whatever picture, another problems with this is a place holder when have a field with this settings the field save a value of place holder and dont validate that is a blank field

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Requiered Field Problem
« Reply #5 on: June 20, 2015, 04:27:18 AM »
any News??


I have a concern regarding this product, just see that bruce is the only one that supports and have recently seen that many programmers have died with their products and that we were to start from scratch with another product.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Requiered Field Problem
« Reply #6 on: June 22, 2015, 08:10:41 AM »
Hi Osa,

The problem you're gonna have with @p pictures is that they contain "something". In other words all that formatting counts when it comes to deciding if a field is blank or not. I may need to add some support for that to detect blankness but only _after_ deformatting.

You can of course add your own code to the ValidateValue::fieldname routine to test for any validation you like, so this may be a good place to deformat the value and check for actual digits. (There's a stringTheory method you could use as well, ISALL )

>> I have a concern regarding this product, just see that bruce is the only one that supports

It's a bit harsh to say that in a thread from other people, but I think I understand what you mean.
The first counter-point to this I would suggest is that CapeSoft is far from being "just bruce" (although I like to think they would notice if I was not here.)

Secondly we deliberately release the product using as much source as possible, which allows the community to effectivly "get stuff done" without me. If I wasn't fixing bugs then someone else would probably take up the slack.

>> and have recently seen that many programmers have died with their products and that we were to start from scratch with another product.

That's a fair point. On the up side I'm younger than some, and I don't smoke :)
A counter point to this I guess is that if you think another product will allow you to achieve your goals, and you feel that they would better be able to provide continuity, then I guess that's something to consider. NetTalk offers you the ability to leverage a lot of your existing code, and existing skills - I guess you have a choice whether to learn something else now (100%) or accept that in the future you _may_ have to learn some other product (<100%).

Cheers
Bruce